-
Notifications
You must be signed in to change notification settings - Fork 15
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
Allow excluding files from search #94
Comments
@ihrwein Thank you soooo much!
Yeah, I believe this kind of feature is neccesary to Shisho. For CLI flag, how do you feel about adding shisho check --exclude "vendor/*" --exclude "any/other/dir/*.yaml" <blah> <blah> On the other hand, I feel that rule files should not include file paths in order to keep portability of the rules. Instead we can add a feature to handle something like
I'd like to get your thoughts on these designs! 😃
I totally agree with you. It will be awesome if Shisho has a feature to suppress reports with comments as you propose. I'll try to implement this in 3 or 4 days. |
Hello @lmt-swallow, thanks for the super quick turnaround :) Regarding excluding files, I like both of your proposals. The declarative Having a way to override the excludes from the CLI also looks useful. I like your proposal - it supports many excludes and globs. I can imagine this is the simpler option to start with (people can use Makefiles), then as more feedback comes the config file can be added? |
Hello @ihrwein . Thank you for your comment!
I have no idea about whether we need a more fine-grained control for each directory, but I guess you're right and rubocop-style approach might work better rather than
Looks great! I'll try to add |
Hello @ihrwein, I added And, as discussed above, we still need a feature to ignore certain files in a |
Hello @lmt-swallow. It works like a charm, thank you! |
You're welcome. I'm happy to hear that! 😄 |
Problem
First of all, thank you for this really useful project.
Shisho finds matches in files which are auto-generated or I don't have control over them (vendored). It's not feasible to fix the reported issues in these files.
I.e. consider this policy file for Golang:
Both rules will likely find matches in the vendor folder. Some libraries generate code with
panic()
calls in it: https://github.com/99designs/gqlgen/blob/1a0b19feff6f02d2af6631c9d847bc243f8ede39/example/chat/generated.go#L2028Possible Solutions
panic("foo") // shisho:ignore deny-panic
Additional Notes
The text was updated successfully, but these errors were encountered: