-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Lint against indexing and slicing #755
Comments
This would be one of the "restrictions" mentioned in #632 Hard to do cross crate though |
THis goes under the "restrictions" thing. Completely avoiding panics is global thing, and hard to do, but blacklisting certain operations is a good step. |
Does the "restrictions" thing require refactoring of clippy or could this particular lint be implemented without major changes? |
It requires refactoring of the lint groups machinery in the python script to be able to create more non-pedantic Allow groups. |
Hmmm... I am not familiar with the architecture of clippy, so I guess I would rather wait until those changes are in place before implementing this. |
Feel free to implement this as a regular pedantic |
Ok! |
Some projects (e.g. operating systems) need to be very careful about panics. Since indexing and slicing panic when indices are out of bounds, I think it would be useful to have a lint for that (allowed by default).
Does this fit the scope of clippy?
The text was updated successfully, but these errors were encountered: