Groups for rustc and rustdoc lints?

i'd like to enable lints that are disabled by default (why is that anyway?) but doing so will end up with something like

#![warn(
    clippy::nursery,
    clippy::pedantic,
    rustdoc::broken_intra_doc_links,
    rustdoc::private_intra_doc_links,
    rustdoc::missing_crate_level_docs,
    rustdoc::private_doc_tests,
    rustdoc::invalid_codeblock_attributes,
    rustdoc::invalid_html_tags,
    rustdoc::invalid_rust_codeblocks,
    rustdoc::bare_urls,
    absolute_paths_not_starting_with_crate,
    elided_lifetimes_in_paths,
    explicit_outlives_requirements,
    keyword_idents,
    macro_use_extern_crate,
    meta_variable_misuse,
    missing_abi,
    missing_copy_implementations,
    missing_debug_implementations,
    non_ascii_idents,
    noop_method_call,
    pointer_structural_match,
    rust_2021_incompatible_closure_captures,
    rust_2021_incompatible_or_patterns,
    rust_2021_prefixes_incompatible_syntax,
    rust_2021_prelude_collisions,
    single_use_lifetimes,
    trivial_casts,
    trivial_numeric_casts,
    unsafe_code,
    unsafe_op_in_unsafe_fn,
    unstable_features,
    unused_crate_dependencies,
    unused_extern_crates,
    unused_import_braces,
    unused_lifetimes,
    unused_macro_rules,
    unused_qualifications,
    variant_size_differences
)]

are there groups for these like there is for clippy? if not, why not? i looked through the docs but couldnt find anything, thank you!

Yes, see Lint Groups - The rustc book

Because some can be problematic, for example they have too much false positive. Some contradict each others. Others are plain controversial.

2 Likes

Some of these lints are already warn by default, and are all stable lints included in one of these groups?

also are there groups for rustdoc lints?

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.