openpreserve / jhove

File validation and characterisation.
http://jhove.openpreservation.org
Other
171 stars 79 forks source link

Add an array level in JSON output to repInfo #728

Closed tledoux closed 2 years ago

tledoux commented 2 years ago

in order to support a list of files to be validated

Fixes #667

codecov[bot] commented 2 years ago

Codecov Report

Merging #728 (439b145) into integration (3c48e70) will increase coverage by 0.77%. The diff coverage is 25.42%.

@@                Coverage Diff                @@
##             integration     #728      +/-   ##
=================================================
+ Coverage          45.68%   46.46%   +0.77%     
- Complexity          1049     1054       +5     
=================================================
  Files                 57       57              
  Lines               9147     9059      -88     
  Branches            1684     1606      -78     
=================================================
+ Hits                4179     4209      +30     
+ Misses              4410     4308     -102     
+ Partials             558      542      -16     
Impacted Files Coverage Δ
...edu/harvard/hul/ois/jhove/handler/JsonHandler.java 24.94% <25.42%> (+3.77%) :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 53749ca...439b145. Read the comment docs.

carlwilson commented 2 years ago

Thanks, @tledoux I was going to look at this myself as one of a couple of PRs of my own, but I hadn't done it yet so you've saved me some time. Will take a look shortly.

tledoux commented 2 years ago

Hi @carlwilson , most welcome to help you on this. The correction itself was just adding an array level to handle the repInfo in case more than one is emitted (I added a test for this case). I will stop with this last commit trying to decrease the complexity to make QA happier, but not enough ;-)

carlwilson commented 2 years ago

Thanks once again @tledoux. There are plenty of overcomplex methods in the code base that have been there for a long time. In many cases it's not a new problem, you get blamed simply for touching a function that was already overlong. TLDR, don't worry too much about the QA :)