Skip to content

Consider more fine grained grouping for built-in lints #45615

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

Open
petrochenkov opened this issue Oct 29, 2017 · 0 comments
Open

Consider more fine grained grouping for built-in lints #45615

petrochenkov opened this issue Oct 29, 2017 · 0 comments
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. C-enhancement Category: An issue proposing an enhancement or a PR with one. T-lang Relevant to the language team, which will review and decide on the PR/issue.

Comments

@petrochenkov
Copy link
Contributor

Copying the comment from #45424 (comment):

I've also audited the remaining ungrouped lints.
In principle new lint groups can be created for them, but it looks like fine-grained lint grouping didn't find its use even in clippy, so I didn't do anything.

Unused++.
These can also be quite reasonably added into the unused group, but less obviously than those I added into it in this PR.

STABLE_FEATURES
RENAMED_AND_REMOVED_LINTS
UNKNOWN_LINTS
UNUSED_COMPARISONS

Bad style++.
Probably can be added into the bad_style group, but it currently consists only of casing-related lints.

NON_SHORTHAND_FIELD_PATTERNS
WHILE_TRUE

Future compatibility++.
Errors that are reported as lints for some reasons unknown to me.
See the question in #45424 (comment) as well.

CONST_ERR // ?
UNKNOWN_CRATE_TYPES // Deny-by-default
NO_MANGLE_CONST_ITEMS // Deny-by-default
NO_MANGLE_GENERIC_ITEMS

Restrictions.
Something generally reasonable that can be prohibited if necessary.

BOX_POINTERS // Allow-by-default
UNSAFE_CODE // Allow-by-default
UNSTABLE_FEATURES // Allow-by-default
MISSING_DOCS // Allow-by-default
MISSING_COPY_IMPLEMENTATIONS // Allow-by-default
MISSING_DEBUG_IMPLEMENTATIONS // Allow-by-default

Pedantic.
Something not bad enough to always report/fix.

UNUSED_RESULTS // Allow-by-default
UNUSED_IMPORT_BRACES // Allow-by-default
UNUSED_QUALIFICATIONS // Allow-by-default
TRIVIAL_CASTS // Allow-by-default
TRIVIAL_NUMERIC_CASTS // Allow-by-default
VARIANT_SIZE_DIFFERENCES // Allow-by-default
UNIONS_WITH_DROP_FIELDS

Obvious mistakes.
Prevent foot shooting, some can become hard errors in principle.

OVERFLOWING_LITERALS
EXCEEDING_BITSHIFTS // Deny-by-default
UNCONDITIONAL_RECURSION
MUTABLE_TRANSMUTES // Deny-by-default
IMPROPER_CTYPES
PLUGIN_AS_LIBRARY
PRIVATE_NO_MANGLE_FNS
PRIVATE_NO_MANGLE_STATICS

General purpose lints.

WARNINGS
DEPRECATED
@petrochenkov petrochenkov added the A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. label Oct 29, 2017
@TimNN TimNN added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Oct 31, 2017
@Enselic Enselic added the T-lang Relevant to the language team, which will review and decide on the PR/issue. label Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. C-enhancement Category: An issue proposing an enhancement or a PR with one. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants