Skip to content

[Tracking issue] Lints that are not grouped #11493

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
blyxyas opened this issue Sep 13, 2023 · 3 comments
Open

[Tracking issue] Lints that are not grouped #11493

blyxyas opened this issue Sep 13, 2023 · 3 comments
Labels
performance-project For issues and PRs related to the Clippy Performance Project

Comments

@blyxyas
Copy link
Member

blyxyas commented Sep 13, 2023

Currently, the lints that are not grouped are the following (got using a regex search for define_clippy_lint!)

  • disallowed_names.rs
  • extra_unused_type_parameters.rs
  • fallible_impl_from.rs
  • default_numeric_fallback.rs
  • unused_unit.rs
  • suspicious_doc_comments.rs
  • implicit_saturating_add.rs
  • missing_doc.rs
  • ignored_unit_patterns.rs
  • almost_complete_range.rs
  • derivable_impls.rs
  • if_then_some_else_none.rs
  • excessive_nesting.rs
  • manual_slice_size_calculation.rs
  • enum_clike.rs
  • default_instead_of_iter_empty.rs
  • error_impl_error.rs
  • manual_is_ascii_check.rs
  • implied_bounds_in_impls.rs
  • default_constructed_unit_structs.rs
  • redundant_async_block.rs
  • create_dir.rs
  • large_stack_frames.rs
  • semicolon_if_nothing_returned.rs
  • reference.rs
  • large_const_arrays.rs
  • precedence.rs
  • blocks_in_if_conditions.rs
  • use_self.rs
  • ptr_offset_with_cast.rs
  • manual_main_separator_str.rs
  • non_send_fields_in_send_ty.rs
  • missing_asserts_for_indexing.rs
  • read_zero_byte_vec.rs
  • option_env_unwrap.rs
  • unnecessary_wraps.rs
  • needless_else.rs
  • items_after_test_module.rs
  • absolute_paths.rs
  • double_parens.rs
  • unwrap_in_result.rs
  • needless_for_each.rs
  • single_char_lifetime_names.rs
  • min_ident_chars.rs
  • self_named_constructors.rs
  • unnested_or_patterns.rs
  • reserve_after_initialization.rs
  • let_with_type_underscore.rs
  • cognitive_complexity.rs
  • escape.rs
  • multiple_unsafe_ops_per_block.rs
  • partial_pub_fields.rs
  • items_after_statements.rs
  • large_include_file.rs
  • disallowed_methods.rs
  • swap_ptr_to_ref.rs
  • entry.rs
  • partialeq_ne_impl.rs
  • manual_bits.rs
  • assertions_on_result_states.rs
  • manual_rem_euclid.rs
  • inconsistent_struct_constructor.rs
  • let_if_seq.rs
  • box_default.rs
  • unnecessary_self_imports.rs
  • upper_case_acronyms.rs
  • disallowed_script_idents.rs
  • strlen_on_c_strings.rs
  • checked_conversions.rs
  • approx_const.rs
  • needless_continue.rs
  • needless_pass_by_value.rs
  • four_forward_slashes.rs
  • missing_const_for_fn.rs
  • needless_if.rs
  • int_plus_one.rs
  • needless_arbitrary_self_type.rs
  • missing_fields_in_debug.rs
  • neg_cmp_op_on_partial_ord.rs
  • rc_clone_in_vec_init.rs
  • only_used_in_recursion.rs
  • uninit_vec.rs
  • option_if_let_else.rs
  • bool_to_int_with_if.rs
  • from_over_into.rs
  • async_yields_async.rs
  • serde_api.rs
  • crate_in_macro_def.rs
  • default_union_representation.rs
  • missing_inline.rs
  • needless_borrowed_ref.rs
  • unused_async.rs
  • permissions_set_readonly_false.rs
  • main_recursion.rs
  • same_name_method.rs
  • manual_retain.rs
  • partialeq_to_none.rs
  • tests_outside_test_module.rs
  • implicit_saturating_sub.rs
  • single_call_fn.rs
  • redundant_static_lifetimes.rs
  • size_of_in_element_count.rs
  • dbg_macro.rs
  • borrow_deref_ref.rs
  • large_enum_variant.rs
  • suspicious_operation_groupings.rs
  • unnecessary_struct_initialization.rs
  • pub_use.rs
  • single_component_path_imports.rs
  • comparison_chain.rs
  • question_mark_used.rs
  • format_push_string.rs
  • mut_reference.rs
  • init_numbered_fields.rs
  • minmax.rs
  • trailing_empty_array.rs
  • inline_fn_without_body.rs
  • iter_not_returning_iterator.rs
  • inherent_impl.rs
  • vec_init_then_push.rs
  • unused_io_amount.rs
  • to_digit_is_some.rs
  • invalid_upcast_comparisons.rs
  • match_result_ok.rs
  • manual_non_exhaustive.rs
  • redundant_closure_call.rs
  • redundant_type_annotations.rs
  • manual_clamp.rs
  • disallowed_macros.rs
  • exit.rs
  • from_raw_with_void_ptr.rs
  • nonstandard_macro_braces.rs
  • mut_key.rs
  • manual_assert.rs
  • redundant_field_names.rs
  • new_without_default.rs
  • empty_drop.rs
  • manual_let_else.rs
  • redundant_pub_crate.rs
  • missing_trait_methods.rs
  • single_range_in_vec_init.rs
  • redundant_clone.rs
  • unused_peekable.rs
  • redundant_locals.rs
  • return_self_not_must_use.rs
  • from_str_radix_10.rs
  • large_stack_arrays.rs
  • overflow_check_conditional.rs
  • vec.rs
  • unused_rounding.rs
  • suspicious_xor_used_as_pow.rs
  • implicit_hasher.rs
  • if_not_else.rs
  • ref_option_ref.rs
  • neg_multiply.rs
  • tabs_in_doc_comments.rs
  • non_octal_unix_permissions.rs
  • macro_use.rs
  • zero_div_zero.rs
  • empty_enum.rs
  • disallowed_types.rs
  • missing_assert_message.rs
  • duplicate_mod.rs
  • equatable_if_let.rs
  • index_refutable_slice.rs
  • as_conversions.rs
  • no_mangle_with_rust_abi.rs
  • useless_conversion.rs
  • bool_assert_comparison.rs
  • manual_string_new.rs
  • future_not_send.rs
  • manual_async_fn.rs
  • utils/dump_hir.rs
  • slow_vector_initialization.rs
  • collection_is_never_read.rs
  • utils/format_args_collector.rs
  • pattern_type_mismatch.rs
  • utils/author.rs
  • if_let_mutex.rs
  • empty_structs_with_brackets.rs
  • lines_filter_map_ok.rs
  • panic_in_result_fn.rs
  • temporary_assignment.rs
  • needless_parens_on_range_literals.rs
  • allow_attributes.rs
  • mismatching_type_param_order.rs
  • significant_drop_tightening.rs
  • size_of_ref.rs
  • unnecessary_box_returns.rs
  • tuple_array_conversions.rs
  • unsafe_removed_from_name.rs
  • needless_pass_by_ref_mut.rs
  • question_mark.rs
  • copy_iterator.rs
  • multi_assignments.rs
  • ref_patterns.rs
  • zero_sized_map_values.rs
  • unit_return_expecting_ord.rs
  • mut_mut.rs
  • arc_with_non_send_sync.rs
  • explicit_write.rs
  • redundant_else.rs
  • format.rs
  • needless_question_mark.rs
  • implicit_return.rs
  • needless_late_init.rs
  • needless_update.rs
  • manual_range_patterns.rs
  • assertions_on_constants.rs
  • unused_self.rs
  • else_if_without_else.rs
  • mutable_debug_assertion.rs
  • missing_enforced_import_rename.rs
  • large_futures.rs
  • octal_escapes.rs
  • manual_strip.rs
  • unnecessary_owned_empty_strings.rs

This is just an index issue to be updated frequently, as frequent as a PR merging some of these into existing / new categories is merged. We can have a significant performance boost if these are merged just by sharing conditionals. Avoiding some allocations would also be a secondary benefit of merging these.

Pending group:

inherent_to_string & inherent_to_string_shadow_displayfunctions

@blyxyas blyxyas added the performance-project For issues and PRs related to the Clippy Performance Project label Sep 13, 2023
@Centri3
Copy link
Member

Centri3 commented Sep 14, 2023

We should disregard most of the restriction lints listed here unless they really cleanly fit into other groups (First thing that comes to mind that really wouldn't is pattern_type_mismatch). Once allowed lints aren't ran, having restriction lints in their own pass should be more efficient on its own

@blyxyas
Copy link
Member Author

blyxyas commented Sep 17, 2023

I just updated the list striking all restriction lints, a case-by-case selection can be done later.

@J-ZhengLi
Copy link
Member

J-ZhengLi commented Sep 18, 2023

How about the inherent_to_string siblings: [inherent_to_string] and [inherent_to_string_shadow_display]? Which could be grouped into functions I think?

bors added a commit that referenced this issue Nov 13, 2023
move `suspicious_doc_comments` to doc pass

This was my first lint. I've been meaning to move it over to `doc.rs` since that's a better place.
There weren't any changes made to the lint logic itself.

I guess this can be considered part of #11493

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance-project For issues and PRs related to the Clippy Performance Project
Projects
None yet
Development

No branches or pull requests

3 participants