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

Question about --ignore <PATH> option #1176

Open
s8sato opened this issue Feb 16, 2024 · 1 comment
Open

Question about --ignore <PATH> option #1176

s8sato opened this issue Feb 16, 2024 · 1 comment

Comments

@s8sato
Copy link

s8sato commented Feb 16, 2024

Hi, we are using grcov for our product coverage analysis!
I have some questions about the --ignore <PATH> option:

  1. Where is considered the root of the PATH?
  2. If I use --ignore "**/main.rs", what effect does this option have on the output?
  3. What is the role of --ignore "/*" in these examples?
@culhatsker
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants