-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add a configuration file and a POC BLACKLISTED_NAME
lint
#698
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
Conversation
22c3f4b
to
244a0da
Compare
Any comment? |
Still no comment/suggestion/remark of any kind? |
Totally forgot about this, sorry 😄 Will look through. |
@@ -16,6 +16,7 @@ name | |||
[almost_swapped](https://github.com/Manishearth/rust-clippy/wiki#almost_swapped) | warn | `foo = bar; bar = foo` sequence | |||
[approx_constant](https://github.com/Manishearth/rust-clippy/wiki#approx_constant) | warn | the approximate of a known float constant (in `std::f64::consts` or `std::f32::consts`) is found; suggests to use the constant | |||
[bad_bit_mask](https://github.com/Manishearth/rust-clippy/wiki#bad_bit_mask) | warn | expressions of the form `_ & mask == select` that will only ever return `true` or `false` (because in the example `select` containing bits that `mask` doesn't have) | |||
[blacklisted_name](https://github.com/Manishearth/rust-clippy/wiki#blacklisted_name) | warn | usage of a blacklisted name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't like the name too much, but it's okay.
(placeholder_name instead? But folks may blacklist more than placeholders)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But folks may blacklist more than placeholders
Yeah, that’s what I though. I’ll change the short description to “usage of a blacklisted or placeholder name” maybe?
Overall looks good to me. @llogiq, thoughts? |
c607015
to
4998645
Compare
The failing build appears to be in |
8390ed1
to
28598ca
Compare
I’ve added the PyLint lint to lint functions with lots of arguments I presented in #694 (what “lots” means being configurable). The default threshold is > 7, which seems (un)reasonable. Racer, rustful, quickcheck, hyper and clippy have no functions with > 7 arguments. Cargo has two functions with 8 arguments (here and there). |
By the way @llogiq (and all), do you prefer |
lowercase! |
I also prefer lowercase. It's rust-clippy, not rust-Clippy after all. 😄 |
Btw, the reason Cargo.toml is uppercase is to be more in line with other build system things like Makefile. We're not a build system thing. |
Ok then, I yield, lowercase it is 😅 |
a6af9b6
to
5609143
Compare
Went through it again, lgtm. Thanks! |
Add a configuration file and a POC `BLACKLISTED_NAME` lint
As suggested in #694. Also add a
BLACKLISTED_NAME
lint and adapt theTYPE_COMPLEXITY
andCYCLOMATIC_COMPLEXITY
lints.The wiki entry looks like this: