The output of rebar3 eunit contains warnings:
_build/test/lib/getopt/test/getopt_test.erl:0: Warning: missing specification for function test/0
_build/test/lib/getopt/test/getopt_test.erl:30: Warning: missing specification for function parse_main_test_/0
_build/test/lib/getopt/test/getopt_test.erl:222: Warning: missing specification for function parse_multiple_repetitions_test_/0
...
I ended up using rebar.config.script to disable warn_missing_spec compiler option for eunit task. I'm not sure if it's the right way to do it. I can make a pull request with the script if it is useful.