Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Track files referenced by other files to identify orphans #2057

Merged
merged 4 commits into from
Aug 8, 2024

Conversation

effigies
Copy link
Collaborator

@effigies effigies commented Aug 5, 2024

This implements the legacy checks:

  • UNUSED_STIMULUS
  • SIDECAR_WITHOUT_DATAFILE

The approach is to add a .viewed boolean field on BIDSFile and trip it when either of the inheritance principle walkBack() or the expression language exists() functions finds the file.

Note that apparently we had a lot of false negatives in the legacy validator, and SIDECAR_WITHOUT_DATAFILE is causing failures of examples.

Should wait on #2064, #2066 and bids-standard/bids-examples#461.

Diff specific to this PR: 2ecf188...e5aeeca

Copy link

codecov bot commented Aug 5, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 87.25%. Comparing base (a4e1a09) to head (73c52d1).

Files Patch % Lines
...ds-validator/src/validators/internal/unusedFile.ts 82.85% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2057      +/-   ##
==========================================
+ Coverage   85.69%   87.25%   +1.56%     
==========================================
  Files          91      140      +49     
  Lines        3782     6788    +3006     
  Branches     1220     1597     +377     
==========================================
+ Hits         3241     5923    +2682     
- Misses        455      775     +320     
- Partials       86       90       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rwblair rwblair merged commit 2829bf9 into bids-standard:master Aug 8, 2024
16 checks passed
@effigies effigies deleted the feat/files-viewed branch August 8, 2024 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants