-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
New lint: pub enum tuple variant adds or removes field (i.e. tuple arity changed) #554
Comments
Hey! I was checking out this issue. The adds and removes field cases in a pub enum are already checked with separate lints
Do they both cover the case of tuple arity being changed, or are we looking for something different here? thanks |
I think those lints only cover changes enums' struct variants, not changes in tuple variants. More info on different enum variant kinds: https://doc.rust-lang.org/std/keyword.enum.html For tuple variants, we can probably have just a single lint that checks that "the tuple contains a different number of elements." As a query, this can make use of the |
Thanks for the quick response! I have written a lint query for the same. However, the enum tuple variant field changes are already covered in the following lints.
Please let me know if I am misinterpreting it; it was interesting to understand how the querying works, though; writing a lint itself is pretty intuitive |
Ah darn, I did a pass through the lints to see if those were implemented, and yet somehow I missed them anyway. Sorry about my sloppiness that ended up wasting your time here. You're right, this issue is completed with no further action needed. If you'd like, I can find and suggest other opportunities to write lints or otherwise contribute to the project — it would be much appreciated! |
Some relatively easy high-impact lints here, for example: #633 |
Both adding and removing the commented-out portion is a breaking change, and I don't believe we currently would catch that.
The text was updated successfully, but these errors were encountered: