samtools / htsjdk

A Java API for high-throughput sequencing data (HTS) formats.
http://samtools.github.io/htsjdk/
283 stars 242 forks source link

Make Validation error emit the validation type that was violated #1395

Closed yfarjoun closed 5 years ago

yfarjoun commented 5 years ago

Validation errors are not helpful for figuring out how to ignore or fix the problem.

By emitting the Type of the validation error, this PR helps the user know which validation error needs to be ignored, or search the code to understand the problem.

codecov-io commented 5 years ago

Codecov Report

Merging #1395 into master will increase coverage by 1.583%. The diff coverage is 100%.

@@              Coverage Diff               @@
##             master     #1395       +/-   ##
==============================================
+ Coverage     68.03%   69.613%   +1.583%     
- Complexity     8368      9686     +1318     
==============================================
  Files           573       573               
  Lines         33885     38135     +4250     
  Branches       5662      6935     +1273     
==============================================
+ Hits          23052     26547     +3495     
- Misses         8643      9206      +563     
- Partials       2190      2382      +192
Impacted Files Coverage Δ Complexity Δ
.../main/java/htsjdk/samtools/SAMValidationError.java 96.154% <100%> (+0.037%) 9 <0> (ø) :arrow_down:
src/main/java/htsjdk/variant/vcf/VCFConstants.java 70% <0%> (-17.5%) 1% <0%> (ø)
...main/java/htsjdk/variant/vcf/VCFHeaderVersion.java 68% <0%> (-3.875%) 21% <0%> (+8%)
src/main/java/htsjdk/samtools/BAMSBIIndexer.java 73.333% <0%> (-1.667%) 1% <0%> (ø)
src/main/java/htsjdk/variant/vcf/VCFHeader.java 89.362% <0%> (-0.697%) 124% <0%> (+48%)
src/main/java/htsjdk/samtools/util/Interval.java 68.293% <0%> (-0.041%) 41% <0%> (+12%)
src/main/java/htsjdk/tribble/Tribble.java 100% <0%> (ø) 16% <0%> (+8%) :arrow_up:
...s/cram/encoding/external/ExternalByteEncoding.java 100% <0%> (ø) 10% <0%> (+5%) :arrow_up:
...ram/encoding/external/ExternalIntegerEncoding.java 100% <0%> (ø) 10% <0%> (+5%) :arrow_up:
src/main/java/htsjdk/tribble/util/TabixUtils.java 0% <0%> (ø) 0% <0%> (ø) :arrow_down:
... and 59 more