Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore lines #4

Open
kennytm opened this issue Jun 13, 2017 · 0 comments
Open

Ignore lines #4

kennytm opened this issue Jun 13, 2017 · 0 comments
Assignees
Milestone

Comments

@kennytm
Copy link
Owner

kennytm commented Jun 13, 2017

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 kennytm added this to the v1.0.0 milestone Jun 13, 2017
@kennytm kennytm self-assigned this Jun 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant