bids-standard / legacy-validator

Validator for the Brain Imaging Data Structure
https://bids-standard.github.io/legacy-validator/
MIT License
186 stars 111 forks source link

feat(context): Detect duplicate columns when parsing TSV files #2039

Closed effigies closed 4 months ago

effigies commented 4 months ago

This is hacky, but it works. @rwblair LMK how you would integrate this into the existing issue framework.

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 50.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 87.02%. Comparing base (5dfc393) to head (693340c).

Files Patch % Lines
bids-validator/src/files/tsv.ts 0.00% 6 Missing :warning:
bids-validator/src/schema/context.ts 0.00% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2039 +/- ## ========================================== + Coverage 85.75% 87.02% +1.26% ========================================== Files 91 136 +45 Lines 3785 6467 +2682 Branches 1218 1553 +335 ========================================== + Hits 3246 5628 +2382 - Misses 453 749 +296 - Partials 86 90 +4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

rwblair commented 4 months ago

That throw is great. You can use addNonSchemaIssue instead of add. You'll have to add TSV_COLUMN_HEADER_DUPLICATE to https://github.com/bids-standard/bids-validator/blob/master/bids-validator/src/issues/list.ts