xenomachina / kotlin-argparser

Easy to use and concise yet powerful and robust command line argument parsing for Kotlin
GNU Lesser General Public License v2.1
485 stars 33 forks source link

Fixes #27 Add inline block parsing method #32

Closed shanethehat closed 6 years ago

codecov-io commented 7 years ago

Codecov Report

Merging #32 into master will increase coverage by 0.23%. The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master     #32      +/-   ##
===========================================
+ Coverage     83.66%   83.9%   +0.23%     
- Complexity      136     138       +2     
===========================================
  Files            11      11              
  Lines           404     410       +6     
  Branches         81      81              
===========================================
+ Hits            338     344       +6     
  Misses           31      31              
  Partials         35      35
Impacted Files Coverage Δ Complexity Δ
...main/kotlin/com/xenomachina/argparser/ArgParser.kt 87.31% <100%> (+0.38%) 54 <2> (+2) :arrow_up:

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 386f22a...ce9df71. Read the comment docs.

shanethehat commented 7 years ago

The code coverage report for this issue is reporting misses because Jacoco doesn't properly understand code generated from inlined methods, which is necessary in this case to use the reified type parameter. (https://stackoverflow.com/questions/39817814/no-coverage-report-for-inlined-kotlin-methods)

Jacoco could be appeased by making the provideParsed function accept a class type as an argument instead, but that is less idiomatic in my opinion, and leads to unpleasant calling code:

ArgParser(args).provideParsed(ParsedArgs::class)