Skip to content

Commit

Permalink
document COV_EXCL_START, COV_EXCL_STOP and COV_EXCL_LINE (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bltg authored Dec 12, 2022
1 parent 1bc2ab4 commit 453ba9f
Showing 1 changed file with 14 additions and 0 deletions.
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

0 comments on commit 453ba9f

Please sign in to comment.