excov_reporter_console v0.1.8 ExCov.Reporter.Console

Summary

Functions

Render a line number if :show_line_number? option is true

Render a list of lines

Render a list of Modules

Render the project report detail if :show_detail?istrue`

Render the project report summary if :show_summary?istrue`

Given an analysed ExCov.Project and a Keyword list of options, prints a code coverage report

Functions

render_line(line, options)
render_line(ExCov.Line.t, Keyword.t) :: iolist

Render a line.

If a line is relevant? and covered? render it in green. If a line is relevant? but not covered? render it in red. If a line is not relevant? render it normally.

render_line_number(line, options)
render_line_number(ExCov.Line.t, Keyword.t) :: iolist

Render a line number if :show_line_number? option is true.

render_lines(lines, options)
render_lines([ExCov.Line.t], Keyword.t) :: iolist

Render a list of lines.

render_module(module, options)
render_module(ExCov.Module.t, Keyword.t) :: iolist

Render a module.

render_modules(modules, options)
render_modules([ExCov.Module.t], Keyword.t) :: iolist

Render a list of Modules.

render_project_detail(project, options)
render_project_detail(ExCov.Project.t, Keyword.t) :: iolist

Render the project report detail if :show_detail?istrue`.

render_project_summary(project, options)
render_project_summary(ExCov.Project.t, Keyword.t) :: iolist

Render the project report summary if :show_summary?istrue`.

report!(project, options \\ [])

Given an analysed ExCov.Project and a Keyword list of options, prints a code coverage report.

Most reporters support the following options:

  • :show_summary? a boolean indicating if a summary should be reported.
  • :show_detail? a boolean indicating if a details should be reported.
  • :console_printer a function that should be called if the reporter wishes to print something to console.

None of the above options are required and reporter may chose to ignore any and all of them.

Callback implementation for ExCov.Reporter.report!/2.