Question about `--ignore <PATH>` option
s8sato opened this issue · 1 comments
Hi, we are using grcov for our product coverage analysis!
I have some questions about the --ignore <PATH>
option:
- Where is considered the root of the PATH?
- If I use
--ignore "**/main.rs"
, what effect does this option have on the output? - What is the role of
--ignore "/*"
in these examples?
Option --ignore
works on the paths built into the coverage files (which are absolute paths usually), unless something like --prefix-dir
is specified which removes the prefix and the paths become relative. So <PATH>
here is a pattern to match the paths, whatever format they have. You can see what data it filters by running grcov path_to_your_coverage -t files
optionally adding other params that you want to use.
--ignore "**/main.rs"
would ignore coverage for all files which path ends with /main.rs
, that's equivalent to --ignore "*/main.rs"
if I'm not mistaken.
--ignore "/*"
would remove coverage for all files that have absolute path (in this example, i suppose they want to ignore all system library files that happened to get into coverage data)