-
Notifications
You must be signed in to change notification settings - Fork 21
Fix/339 bug update exit code if recursed directory contains errors #340
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
Fix/339 bug update exit code if recursed directory contains errors #340
Conversation
…ains-errors' of https://github.com/bids-standard/bids-validator into fix/339-bug-update-exit-code-if-recursed-directory-contains-errors
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #340 +/- ##
==========================================
+ Coverage 86.99% 87.00% +0.01%
==========================================
Files 51 51
Lines 3883 3887 +4
Branches 622 624 +2
==========================================
+ Hits 3378 3382 +4
Misses 495 495
Partials 10 10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
What about a simple boolean function to find the first error and stop? Here's a quick function I haven't tested: export function detectErrors(result: ValidationResult): boolean {
return result.issues.get({ severity: 'error' }).length > 0 ||
Object.values(result.derivativesSummary ?? {}).some((res) => detectErrors(res))
} |
I like where your head's at. |
|
ohh boo, now my coverage went down. |
effigies
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small cleanups
A nested/derivatives bids dataset returns a 0 exit code even if it's evaluated as invalid, this PR sets the exit code to non-zero in that case.