-
Notifications
You must be signed in to change notification settings - Fork 283
Support of toml configuration #881
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
Support of toml configuration #881
Conversation
I will look into it in more detail later in the week, but 2 quick unrelated notes:
For the code itself something feels off with how |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a big/important feature, and that makes me a bit nervous.
I'm on board with the main ideas of this PR:
- support a
gcovr.toml
file - handle multi-value options by flattening a toml list into one ConfigEntry per element
I am less certain about the other stuff – multiple configurations, pyproject.toml support. See the following comments for detailed discussion.
This reverts commit fdc0a1b.
No problem.
I won't do this in the near future because in my company we use SCM Clearcase and the path resolution is not working there. I've already provided a patch for os.path to work in Clearcase but need to raise a PR for path lib to ignore the same errors in path resolution on Windows as os.path is doing.
dict supports [] since 3.9 but we still support 3.8.
This is changed with the next push as suggested by @latk:
|
- In pyproject.toml `tool.gcovr` is used. - In gcovr.toml no section is used.
10cfafd
to
46c6cf5
Compare
The config parsing is done with iterators and the needs to be handled while the file is opened (inside the `with` statement).
46c6cf5
to
27273fb
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #881 +/- ##
=======================================
Coverage 95.33% 95.33%
=======================================
Files 54 54
Lines 4544 4566 +22
Branches 893 904 +11
=======================================
+ Hits 4332 4353 +21
Misses 130 130
- Partials 82 83 +1 ☔ View full report in Codecov by Sentry. |
@LecrisUT Any updates here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. @latk covered the concerns I had. I looked over the new implementation and it all looks fine now
This PR adds initial support for a TOML configuration. Following configuration files are searched in the root directory, the first one which is found is used:
If a TOML file is found the section
gcovr
is searched which can also be a list. If no section is found the file is ignored.I prefer first to do a review on the code and if this is done I'll start with the documentation.
Closes #875