Skip to content

Ignore crate: is it expected that WalkBuilder#types overrides hidden default? #1699

Answered by BurntSushi
nwj asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, it's correct. The intent here is that you've explicitly given a type you want to search, and that should generally override more general default behavior. If you want to search non-hidden markdown files, you should be able to filter out hidden files pretty easily. Or you could add an override glob that does it, e.g., ![!.]* or something like that.

Technically, this is somewhat covered by the rule precedence in the docs, although it can be a bit hard to interpret.

Specifically, the third rule states:

Third, if the previous step yields an ignore match, then all matching is stopped and the path is skipped. If it yields a whitelist match, then matching continues. A whitelist match can b…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nwj
Comment options

Answer selected by nwj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants