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

rf(filetree): Uniformize bidsignore reading between web, CLI and test functions #113

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

effigies
Copy link
Contributor

Currently, the Deno CLI reads the bidsignore file and then loads the filetree. The premature load isn't necessary because FileTrees now can hold a reference to the FileIgnoreRules object.

The web UI loads the FileTree without passing them a reference to the FileIgnoreRules object, and then loads the bidsignore after the fact. So this has the possibility of missing ignores that bids-standard/legacy-validator#2152 was intended to address.

Finally, the pathsToTree function doesn't allow any ignoring at all, which limits our ability to write tests.

This PR allows filesToTree to accept a FileIgnoreRules object and inject it in every FileTree it creates. Then we can make the web/CLI implementations work the same: build the tree, load the bidsignore. The pathsToTree function can accept a list of paths or patterns.

Follow-up to bids-standard/legacy-validator#2152.

This ensures that consistent ignores are created for web and test file
trees.
@effigies effigies changed the title rf: Uniformize bidsignore reading between web, CLI and test functions rf(filetree): Uniformize bidsignore reading between web, CLI and test functions Nov 14, 2024
@rwblair rwblair merged commit 5b5c2e2 into bids-standard:main Nov 14, 2024
17 checks passed
@effigies effigies deleted the fix/uniformize-ignore branch November 14, 2024 21:41
effigies added a commit to effigies/bids-validator that referenced this pull request Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants