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

Add option for decision and function threshold #773

Merged
merged 20 commits into from
Aug 4, 2023

Conversation

Spacetown
Copy link
Member

Add --fail-under-decision and --fail-under-function which will error under a given minimum coverage.

The exit code for an error of the reader module is changed from 8 to 64 and for a writer from 7 to 128 to have the coverage thresholds together.
The documentation also stated that the threshold exit statuses can be ORed. This wasn't true anymore since the writer error (7) sets also the bits for the minimum line (2) and branch coverage (4). Now this behavior is fixed.

Closes #759

@Spacetown Spacetown added Type: Enhancement cli relating to the command line interface or the config system labels Apr 24, 2023
@Spacetown Spacetown added this to the Upcoming release milestone Apr 24, 2023
@Spacetown Spacetown force-pushed the add_option_for_decision_threshold branch from 61bee02 to 7cec726 Compare April 24, 2023 18:34
@codecov
Copy link

codecov bot commented Apr 24, 2023

Codecov Report

Patch coverage: 96.49% and project coverage change: -0.02% ⚠️

Comparison is base (ed68b51) 95.62% compared to head (135147f) 95.61%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #773      +/-   ##
==========================================
- Coverage   95.62%   95.61%   -0.02%     
==========================================
  Files          41       41              
  Lines        4047     4079      +32     
  Branches      793      805      +12     
==========================================
+ Hits         3870     3900      +30     
  Misses        100      100              
- Partials       77       79       +2     
Files Changed Coverage Δ
gcovr/configuration.py 99.50% <ø> (ø)
gcovr/__main__.py 96.29% <95.23%> (-0.70%) ⬇️
gcovr/tests/test_args.py 99.02% <100.00%> (+0.02%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Spacetown Spacetown force-pushed the add_option_for_decision_threshold branch 2 times, most recently from 74c4cc4 to 8e18ac8 Compare April 29, 2023 21:51
@Spacetown Spacetown force-pushed the add_option_for_decision_threshold branch from 8e18ac8 to e1a5841 Compare April 29, 2023 21:58
@Spacetown Spacetown force-pushed the add_option_for_decision_threshold branch from 93c4001 to 38059e8 Compare August 2, 2023 20:49
@Spacetown Spacetown merged commit df9ca3e into gcovr:master Aug 4, 2023
@Spacetown Spacetown deleted the add_option_for_decision_threshold branch August 4, 2023 19:15
@Codym48
Copy link

Codym48 commented Sep 26, 2023

Thank you for doing this @Spacetown! Any idea when the next gcovr release is planned?

@Spacetown
Copy link
Member Author

Nothing planned yet. I think before end of this year should be possible.

@Codym48
Copy link

Codym48 commented Sep 30, 2023

Sounds good, let me know if there's anything we can do to help!

@Spacetown
Copy link
Member Author

@Codym48 Review open PRs. I don't like to merge without review.

@Spacetown Spacetown removed this from the Upcoming release milestone Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli relating to the command line interface or the config system Type: Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support fail_under_decision option in CLI
2 participants