cov icon indicating copy to clipboard operation
cov copied to clipboard

Ignore lines

Open kennytm opened this issue 8 years ago • 0 comments

Use lcov markers to remove a source line's statistics.

       LCOV_EXCL_LINE
              Lines containing this marker will be excluded.
       LCOV_EXCL_START
              Marks the beginning of an excluded section. The current line  is
              part of this section.
       LCOV_EXCL_STOP
              Marks  the end of an excluded section. The current line not part
              of this section.
       LCOV_EXCL_BR_LINE
              Lines containing this marker will be excluded from branch cover‐
              age.
       LCOV_EXCL_BR_START
              Marks  the  beginning of a section which is excluded from branch
              coverage. The current line is part of this section.
       LCOV_EXCL_BR_STOP
              Marks the end of a section which is excluded from branch  cover‐
              age. The current line not part of this section.

assert!, assert_eq!, debug_assert!, debug_assert_eq!, panic! should have the same effect as LCOV_EXCL_BR_LINE.

These strings should be configurable.

  • JaCoCo uses $COVERAGE-IGNORE$
  • coverage.py uses pragma: no cover

kennytm avatar Jun 13 '17 20:06 kennytm