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

tweak the parsing of files for flags with disable_flag_override #800

Merged
merged 2 commits into from
Nov 30, 2022

Conversation

phlptp
Copy link
Collaborator

@phlptp phlptp commented Nov 4, 2022

Allow true as a valid value to be interpreted as the default in that case.

Ran into a situation where the user was very confused by an error in a config file. Basically had a flag with disable_flag_override that was using different hidden values. The user tried to specify it in a config file and expected "flag":true to work and gave a confusing error.

This PR tweaks things a little so a value equivalent to "true" in a config file will get properly converted to the appropriate default value and remove a confusing error condition.

phlptp and others added 2 commits November 3, 2022 20:22
…cally allow true as a valid value to be interpreted as the default in that case
@codecov
Copy link

codecov bot commented Nov 4, 2022

Codecov Report

Base: 99.42% // Head: 99.42% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (a21ba3c) compared to base (25274e2).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #800   +/-   ##
=======================================
  Coverage   99.42%   99.42%           
=======================================
  Files          16       16           
  Lines        3977     3985    +8     
=======================================
+ Hits         3954     3962    +8     
  Misses         23       23           
Impacted Files Coverage Δ
include/CLI/impl/App_inl.hpp 99.21% <100.00%> (+<0.01%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@phlptp phlptp merged commit 71755e4 into CLIUtils:main Nov 30, 2022
@phlptp phlptp deleted the flag_override_parsing branch November 30, 2022 23:43
@github-actions github-actions bot added needs changelog Hasn't been added to the changelog yet needs README Needs to be mentioned in the README labels Nov 30, 2022
@henryiii henryiii removed the needs README Needs to be mentioned in the README label Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs changelog Hasn't been added to the changelog yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants