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

Allow disabling certain rules #148

Open
MatthewDarling opened this issue Jan 4, 2016 · 5 comments
Labels

Comments

@MatthewDarling
Copy link

@MatthewDarling MatthewDarling commented Jan 4, 2016

One of Kibit's current rules is, "replace (filter seq coll) with (remove empty? coll)". Some of the people on my team prefer (filter seq coll), so I'd like to disable that one rule, while using the rest of Kibit as usual.

From looking at the code, it seems like there isn't a simple way to specify one individual rule for removal. I guess the user could provide literals for what rules to remove... Alternatively, they could be named and then have the removals operate on those names.

@MatthewDarling MatthewDarling changed the title Enable disabling certain rules Allow disabling certain rules Jan 4, 2016
@danielcompton

This comment has been minimized.

Copy link
Collaborator

@danielcompton danielcompton commented Jan 4, 2016

#139 kind of paves the way for this. I've been thinking about how best to allow people to do just what you're asking, #2 is another long standing issue that would be addressed with this.

@MatthewDarling

This comment has been minimized.

Copy link
Author

@MatthewDarling MatthewDarling commented Jan 5, 2016

Actually, I went and looked at rules.clj and it looks like we could get what we want by just copying the existing defrules and removing some. And then just use the new defrules as a custom rule set, and rely on merge to overwrite the old ones.

So it's possible, which is good for me to know! It's just not granular enough right now to swap out a small number of rules.

@danielcompton

This comment has been minimized.

Copy link
Collaborator

@danielcompton danielcompton commented Jan 10, 2016

Yeah, there really needs to be identifiers for every rule (or collection of rules) which would let people specify rules to include/ignore. A PR on this would be amazing if you're inclined :)

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Mar 24, 2017

I am also interested in seeing this, for the same reasons that @lvh stated in RackSec/desdemona#16. In fact usage of the threading macro is almost the only thing kibit complains about on our code-base.

@didibus

This comment has been minimized.

Copy link

@didibus didibus commented Jul 7, 2018

Any hope for this anytime soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.