rebar3_uncovered
[ 
A Rebar 3 plugin that reports on uncovered lines from tests. Run it after
rebar3 eunit or rebar3 ct to see which lines your tests missed. Use --git
to narrow the report to lines changed since the last commit.
A machine-readable format is also available for script / CI / LLM consumption.
Prefix with QUIET=1 to suppress Rebar's own log messages:
$ QUIET=1 rebar3 uncovered --git --format=raw --context=0
src/gaffer_queue.erl:141 0 _ = gaffer_hooks:with_hooks(
src/gaffer_queue.erl:142 0 Hooks, [gaffer, queue, delete], Name, fun(N) -> N end
src/gaffer_queue.erl:144 0 ok = gaffer_sup:stop_queue(gaffer_queue_sup:pid(Name)),
src/gaffer_queue.erl:145 0 persistent_term:erase({gaffer_queue, Name})
src/gaffer_queue.erl:151 0 {error, not_found} -> okUsage
rebar3 uncovered [options] [-- path ...]
rebar3 help uncovered
Positional arguments after -- are used as file or directory filters.
Options
--help,-hShow usage information and available options.
--git,-gFilter uncovered lines to only those changed in the current git diff. Disabled by default.
--git-scopeWhich part of the git diff to consider. Only has effect when
--gitis enabled.all(default) — both staged and unstaged changesstaged— only changes added to the indexunstaged— only working tree changes
--coverageWhich coverage data to use.
aggregate(default) — combine all test suiteseunit— only EUnit coverage datact— only Common Test coverage data
--format,-fOutput format.
human(default) — color-coded table with line numbers, coverage counts, and source contextraw— one line per uncovered line in a grep-like format suitable for scripts, CI, or LLM consumption. Set the environment variableQUIET=1to suppress Rebar's own log messages for clean output
--context,-CNumber of covered lines to show around each uncovered line for context. Only applies to
humanformat.<integer>(default:2) — number of context lines to show0— show only uncovered linesall— show the entire function
--countsShow how many times each line was executed. Use
--counts falseto hide the counts column. Enabled by default.--colorColor output. Respects the
NO_COLORenvironment variable.auto(default) — enable color when output is a terminalalways— force color onnever— disable color
Changelog
See the Releases page.
Code of Conduct
Find this project's code of conduct in Contributor Covenant Code of Conduct.
Contributing
First of all, thank you for contributing with your time and energy.
If you want to request a new feature make sure to open an issue so we can discuss it first.
Bug reports and questions are also welcome. If you found a bug, please check that you're using the latest version first. If you have a question, search the issue database as it might have already been answered.
Contributions will be subject to the MIT License. You will retain the copyright.
For more information check out CONTRIBUTING.md.
Security
This project's security policy is made explicit in SECURITY.md.
Conventions
Versions
This project adheres to Semantic Versioning.
License
This project uses the MIT License.