-
Notifications
You must be signed in to change notification settings - Fork 74
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
Add IgnoredPaths option #111
Conversation
Hi @angristan Thanks for the PR! This proposed feature by #100 is indeed a very nice feature. Taking your feature and thinking a bit more in the use cases, would make sense to use a list of complied Regexes instead of raw strings? The only tradeoff that I would see with string comparison VS regex, is that the regexes are less efficient WDYT? |
@slok Sure, why not! My current need is only a static list of paths, but I think that regexes probably make sense for most of the use cases. I would be fine with going regex-only, otherwise a tradeoff could be to have two options, or a single option with two fields like so: IgnoredPaths struct {
StaticPaths []string
RegexPaths []string
} |
Hello @slok ! |
Would be very helpful even only with StaticPaths |
Hey @slok is there any plan to merge this? Thank you! |
Lets do this then, however I would suggest using an map instead of a list as the list and the loop would have performance impact on the hot path and using an index would be faster. Also lets add some tests please :) |
Very good point!
I added a test :) |
any updates? |
Hey! Missed this one. Yeah, I will change the config type to improve the UX, update the dependencies and cut a new release. |
Done: v0.13.0 |
Thanks :D |
Close #100
With this diff:
Resulting metrics: