Skip to content

Adding take_last - #40

Merged
henryiii merged 2 commits into
masterfrom
take-last
Nov 19, 2017
Merged

henryiii merged 2 commits into
masterfrom
take-last

Conversation

@henryiii

Copy link
Copy Markdown
Collaborator

This adds take_last, which causes the final option given to be the only one considered. So:

--opt one --opt two

Would set opt to two. opt->count is still 2. This was also used to implement bool flags (on by default), which allows someone to restore the behavior seen before #38 by setting ->take_last(false) and is a better/more general fix than #38 . This is a partial fix for #39 ; the other part of the fix would be giving the user more power over the failure messages.

@codecov

codecov Bot commented Nov 18, 2017

Copy link
Copy Markdown

Codecov Report

Merging #40 into master will decrease coverage by 0.17%.
The diff coverage is 86.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #40      +/-   ##
==========================================
- Coverage     100%   99.82%   -0.18%     
==========================================
  Files           9        9              
  Lines        1141     1153      +12     
  Branches      233      235       +2     
==========================================
+ Hits         1141     1151      +10     
- Misses          0        2       +2
Impacted Files Coverage Δ
include/CLI/App.hpp 100% <100%> (ø) ⬆️
include/CLI/Option.hpp 98.95% <83.33%> (-1.05%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a35db8...11a61eb. Read the comment docs.

@codecov

codecov Bot commented Nov 18, 2017 •

Copy link
Copy Markdown

Codecov Report

Merging #40 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #40   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           9      9           
  Lines        1141   1153   +12     
  Branches      233    235    +2     
=====================================
+ Hits         1141   1153   +12
Impacted Files Coverage Δ
include/CLI/Option.hpp 100% <100%> (ø) ⬆️
include/CLI/App.hpp 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a35db8...2e54a50. Read the comment docs.

@henryiii
henryiii merged commit 5f1df63 into master Nov 19, 2017
@henryiii
henryiii deleted the take-last branch November 19, 2017 20:18
@henryiii henryiii added this to the v1.3 milestone Nov 22, 2017
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

Successfully merging this pull request may close these issues.

1 participant