"ignore" crate: Possible to test single paths for ignore status? #2862
-
Use caseWe're using the ignore crate in our project, and would like to check for single paths whether or not they match any of the default ignore rules. Is that currently possible? ExampleWe're thinking of something like using let tester = IgnoreTestBuilder.new("the/directory").standard_filters(true);
assert!(tester.test_ignore("tmp/log_output"), true); Current workaroundWe're going through the entire |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
No, it isn't. This is something I'd like to support in the future, but the entire If this is a requirement for your project, you'll need to implement this on your own. You can probably reuse some components from |
Beta Was this translation helpful? Give feedback.
No, it isn't. This is something I'd like to support in the future, but the entire
ignore
crate needs to be re-thought from the ground-up before I'd be willing to tackle it. I've been saying for a long time that the crate needs to be rewritten and it hasn't happened yet, so I wouldn't hold my breath unfortunately.If this is a requirement for your project, you'll need to implement this on your own. You can probably reuse some components from
ignore
though, like theGitignore
matcher.