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

document COV_EXCL_START, COV_EXCL_STOP and COV_EXCL_LINE #335

Merged
merged 2 commits into from
Dec 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,20 @@ Be aware of a few limitations:
- a line that can take one of two branches gets marked as covered even if only one branch is tested
- currently, code run by Julia's internal interpreter [is not marked as covered](https://github.com/JuliaLang/julia/issues/37059).

### Exclude specific lines or sections from coverage

To exclude specific code blocks, surround the section with `COV_EXCL_START` and `COV_EXCL_STOP` comments:
```julia
# COV_EXCL_START
foo() = nothing
# COV_EXCL_STOP
```

To exclude a single line, add a comment with `COV_EXCL_LINE`:
```julia
const a = 1 # COV_EXCL_LINE
```

### Memory allocation

Start julia with
Expand Down