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

Gradually add in useful clippy lints that we currently don't check for #97

Closed
mulkieran opened this issue Oct 15, 2019 · 10 comments
Closed
Assignees

Comments

@mulkieran
Copy link
Member

mulkieran commented Oct 15, 2019

Ultimately this will be helpful. But we might have to add them in gradually. Some are hard to fathom.

@mulkieran
Copy link
Member Author

mulkieran commented Oct 15, 2019

Well, stratisd has about 40 warnings, and devicemapper has 0. Let's do it for devicemapper now, so we can catch as necessary. Or alternatively, let's grab one we like and do that.

@mulkieran
Copy link
Member Author

needless_borrow, the one I was really interested in, is in the nursery. devicemapper has 0 needless borrows, stratisd seems to have about 80.

@mulkieran mulkieran self-assigned this Oct 15, 2019
@mulkieran mulkieran changed the title Let's add pedantic clippy lints to the lists of things we must obey Gradually add in useful clippy lints that we currently don't check for Oct 15, 2019
@mulkieran
Copy link
Member Author

@jbaublitz If you find a lint in the nursery or pedantic categories that you find especially valuable, please feel free to propose it.

@jbaublitz
Copy link
Member

The only ones that jump out at me immediately are some of the integer lints around wrapping and lossy conversions. It could be interesting to see if we guard against that everywhere.

@mulkieran
Copy link
Member Author

@jbaublitz If you want to go ahead and try one of those out in a PR go right ahead.

@jbaublitz
Copy link
Member

I'm not sure that the suggested lints are going to help here. Most of the warnings are about u64 to usize and given this is only a problem on 32-bit systems, I don't think we'll get much benefit out of this as stratisd is not meant for 32 bit. I don't think I can add anything in terms of lints to what we already have.

@mulkieran
Copy link
Member Author

Ok! We'll let this sit until something does come up.

@mulkieran
Copy link
Member Author

If we're just letting it sit, we can remove it from every board.

@mulkieran
Copy link
Member Author

I'm thinking of going through these lints and turning on all the ones that make obvious sense and that we already don't infringe, in order to prevent future infringements. Then we can work on the more tricky ones, that we are actually infringing and that are important to us.

@mulkieran
Copy link
Member Author

mulkieran commented Jan 3, 2024

We stopped trying to keep our CLIPPY_PEDANTIC variable in the stratisd Makefile up-to-date and maintained a long time ago, because we got a really limited benefit from doing that. Maybe someday we'll remove that variable entirely and rely on clippy processes to promote the pedantic lints to more interesting categories. It is not in use for any of the other Rust projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants