Open obi1kenobi opened 1 month ago
Hi! I have checked the linked PRs
and followed along and I would like start working on the item:
Thanks for the extremely well written out explanation, it really helps for newer contributors to get context of why/hows.
I would like to claim the following to start off
Is there a written convention on lints name? non_sealed_trait_added_assoc_const_without_default
seems right to me yet quite lengthy.
Let's go with simpler names like trait_associated_const_added
, and mention the sealed-ness of the trait in the description field and in the error message as needed. We wouldn't lint this on sealed traits, or if there were a default value, so I don't see a reason to disambiguate from those cases.
There's no written convention, we're just aiming for consistency and relative brevity for now. Eventually I'd like to do a pass where we improve all the lint names, but that's not that high-priority right now.
From the PR
it looks like the has_body: Boolean!
property on Method
was merged recently, so if I am not mistaken that means we can also add the lints that need it like:
If thats the case, Id like to claim this one :)
Updated the list, go for it!
I can claim this one
We can now query whether lints are sealed or not: https://github.com/obi1kenobi/trustfall-rustdoc-adapter/pull/343
Many changes in non-sealed traits are breaking downstream, since any downstream implementations of that trait will need to be adjusted to match the trait item changes.
Querying the sealed status of traits was a prerequisite for a variety of SemVer major lints, which can now be implemented:
For guidance on how to write these lints, look at existing lints that check trait-related breakage. For example, here's the lint for "a non-sealed trait's method stopped being
unsafe
, so implementations must remove theunsafe
keyword in their declarations": https://github.com/obi1kenobi/cargo-semver-checks/blob/661fcedaf8b1700959a61306433807f08edf457f/src/lints/trait_method_unsafe_removed.ronAlso make sure to check out our contributing guide, and take a look at what prior lints' merged PRs looked like so you know what to expect. It's easier than you think!