-
Notifications
You must be signed in to change notification settings - Fork 39
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
Ignore / only warn about missing files #86
Comments
Hmm, never heard about this use case before. What is the reasoning/workflow behind having your coverage report include files that aren't checked in? My assumption is that if the file isn't checked in, then it shouldn't be included as part of the coverage report in the first place. |
My use case is some WIP test file that is used only locally. It's only really an issue since If you do not want to ignore/skip them I'd suggest to improve the error message then at least. Maybe it could also be mentioned with the recipe at https://github.com/aconrad/pycobertura#why-doesnt-pycobertura-use-git-to-diff-the-source-given-revision-shas-rather-than-passing-paths-to-the-source-code. |
Thanks @blueyed for the explanation. I definitely think we should have a nicer error message instead of a stack trace which is not user-friendly. As for the ignore/skip I have to think more and what it entails -- but at a first glance it seems feasible. But before that let me tell you that if you are working locally making changes as you go then you technically don't need to do the For example, you could do:
Then just repeat steps 5 and 6 as you make code changes to your code base.
Let me know if the steps above work for you and I will update the README to make it clearer. |
Hm. I think that's a good idea. We should still prevent missing files from crashing pycobertura to address the root issue. But ignoring coverage for files included in .gitignore could be useful. Can we think of any downsides? Should it be enabled by default or be an opt-in to begin with? |
It might be useful to ignore missing files, issuing a warning only.
This is relevant for when using
git archive
to create the source trees, whichdoes not include untracked files, which are included in the report/coverage.xml
though.
Currently it is failing like this:
The text was updated successfully, but these errors were encountered: