Skip to content

Commit

Permalink
Update exclude_path description and examples
Browse files Browse the repository at this point in the history
Now that we use cargo-llvm-cov, `exclude_path` should be a regular
expression, since we are using `--ignore-filename-regex` option:

   --ignore-filename-regex <PATTERN>
       Skip source code files with file paths that match the given
       regular expression

To prevent users from separating multiple files with commas,
let's update the `exclude_path` description in the README and in
the examples.

Signed-off-by: Stefano Garzarella <[email protected]>
  • Loading branch information
stefano-garzarella authored and roypat committed Oct 20, 2023
1 parent 9699b4d commit 4c55aa7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ found in
The json must have the following fields:

- `coverage_score`: The coverage of the repository.
- `exclude_path`: This field is used for excluding files from the report. It
should be used to exclude autogenerated files. Files in `exclude_path` are
separated by one comma. If the repository does not have any autogenerated
files, `exclude_path` should be an empty string.
- `exclude_path`: This field is used for excluding files from the report.
File paths that match the given regular expression are skipped. (for example,
if multiple files are to be skipped, they must be separated with `|`).
It should be used to exclude autogenerated files. If the repository does not
have any autogenerated files, `exclude_path` should be an empty string.
- `crate_features`: `cargo kcov` does not build crate features by default. To
get the coverage report including optional features, these need to be
specified in `crate_features` separated by comma. If the crate does not have
Expand Down
2 changes: 1 addition & 1 deletion coverage_config_aarch64.json.sample
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"coverage_score": 90,
"exclude_path": "my_autogenerated_file.rs,second_file.rs",
"exclude_path": "my_autogenerated_file\\.rs|path/to/my_folder",
"crate_features": "my_dummy_feature,dummy_feature2"
}
2 changes: 1 addition & 1 deletion coverage_config_x86_64.json.sample
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"coverage_score": 90,
"exclude_path": "my_autogenerated_file.rs,second_file.rs",
"exclude_path": "my_autogenerated_file\\.rs|path/to/my_folder",
"crate_features": "my_dummy_feature,dummy_feature2"
}

0 comments on commit 4c55aa7

Please sign in to comment.