Skip to content

Error work - #56

Merged
henryiii merged 10 commits into
masterfrom
optval
Nov 26, 2017
Merged

henryiii merged 10 commits into
masterfrom
optval

Conversation

@henryiii

@henryiii henryiii commented Nov 26, 2017 •

Copy link
Copy Markdown
Collaborator

This cleans up Error throwing in several cases.

  • Requiring N values now throws an ArgumentMismatch if that number was not received (changes old error in some cases, finally correctly throws an error in the 0 received for 1 case)
  • Options automatically lock if given an exact number of arguments when configured
  • At least -N values required when N is negative (need to add test)
  • Text processing moved to Error.h in many cases (parse related so far)

This also unifies the old _parse_short and _parse_long into a single function, _parse_arg, reducing a lot of redundancy.

@codecov

codecov Bot commented Nov 26, 2017

Copy link
Copy Markdown

Codecov Report

Merging #56 into master will increase coverage by 0.07%.
The diff coverage is 97.91%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #56      +/-   ##
==========================================
+ Coverage   99.84%   99.92%   +0.07%     
==========================================
  Files           9        9              
  Lines        1311     1314       +3     
  Branches      259      253       -6     
==========================================
+ Hits         1309     1313       +4     
+ Misses          2        1       -1
Impacted Files Coverage Δ
include/CLI/StringTools.hpp 100% <ø> (ø) ⬆️
include/CLI/Error.hpp 100% <100%> (ø) ⬆️
include/CLI/App.hpp 100% <100%> (+0.27%) ⬆️
include/CLI/Ini.hpp 100% <100%> (ø) ⬆️
include/CLI/Option.hpp 99.56% <90%> (-0.44%) ⬇️

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 afd4e32...e8a4f35. Read the comment docs.

@codecov

codecov Bot commented Nov 26, 2017 •

Copy link
Copy Markdown

Codecov Report

Merging #56 into master will increase coverage by 0.15%.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #56      +/-   ##
========================================
+ Coverage   99.84%   100%   +0.15%     
========================================
  Files           9      9              
  Lines        1311   1280      -31     
  Branches      259    246      -13     
========================================
- Hits         1309   1280      -29     
+ Misses          2      0       -2
Impacted Files Coverage Δ
include/CLI/StringTools.hpp 100% <ø> (ø) ⬆️
include/CLI/Ini.hpp 100% <100%> (ø) ⬆️
include/CLI/Option.hpp 100% <100%> (ø) ⬆️
include/CLI/Error.hpp 100% <100%> (ø) ⬆️
include/CLI/App.hpp 100% <100%> (+0.27%) ⬆️

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 afd4e32...1df610b. Read the comment docs.

@henryiii
henryiii merged commit 1dc54dc into master Nov 26, 2017
@henryiii
henryiii deleted the optval branch November 26, 2017 20:11
@henryiii henryiii added this to the v1.3 milestone Nov 28, 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