From 05aa672b1ebfe224eea34d6decc57aed95ea5bfc Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 29 Dec 2020 15:06:36 -0800 Subject: [PATCH] Suppress all currently triggered clippy pedantic lints --- gen/build/src/lib.rs | 20 ++++++++++++++++++++ gen/cmd/src/main.rs | 16 ++++++++++++++++ gen/lib/src/lib.rs | 17 +++++++++++++++++ macro/src/lib.rs | 16 ++++++++++++++++ src/lib.rs | 6 ++++++ tests/ffi/lib.rs | 8 +++++++- tests/test.rs | 11 ++++++++++- tests/unique_ptr.rs | 2 ++ 8 files changed, 94 insertions(+), 2 deletions(-) diff --git a/gen/build/src/lib.rs b/gen/build/src/lib.rs index e3230714..c2704155 100644 --- a/gen/build/src/lib.rs +++ b/gen/build/src/lib.rs @@ -46,13 +46,33 @@ //! ``` #![allow( + clippy::cast_sign_loss, + clippy::default_trait_access, + clippy::doc_markdown, clippy::drop_copy, + clippy::enum_glob_use, clippy::inherent_to_string, + clippy::items_after_statements, + clippy::let_underscore_drop, + clippy::map_flatten, + clippy::match_bool, + clippy::match_on_vec_items, + clippy::match_same_arms, + clippy::module_name_repetitions, clippy::needless_doctest_main, + clippy::needless_pass_by_value, clippy::new_without_default, clippy::nonminimal_bool, + clippy::option_if_let_else, clippy::or_fun_call, + clippy::redundant_closure_for_method_calls, + clippy::redundant_else, + clippy::shadow_unrelated, + clippy::similar_names, + clippy::single_match_else, + clippy::struct_excessive_bools, clippy::too_many_arguments, + clippy::too_many_lines, clippy::toplevel_ref_arg )] diff --git a/gen/cmd/src/main.rs b/gen/cmd/src/main.rs index 2372c2c1..9072e60e 100644 --- a/gen/cmd/src/main.rs +++ b/gen/cmd/src/main.rs @@ -1,11 +1,27 @@ #![allow( + clippy::cast_sign_loss, clippy::cognitive_complexity, + clippy::default_trait_access, + clippy::enum_glob_use, clippy::inherent_to_string, + clippy::items_after_statements, clippy::large_enum_variant, + clippy::match_bool, + clippy::match_on_vec_items, + clippy::match_same_arms, + clippy::module_name_repetitions, + clippy::needless_pass_by_value, clippy::new_without_default, clippy::nonminimal_bool, + clippy::option_if_let_else, clippy::or_fun_call, + clippy::redundant_else, + clippy::shadow_unrelated, + clippy::similar_names, + clippy::single_match_else, + clippy::struct_excessive_bools, clippy::too_many_arguments, + clippy::too_many_lines, clippy::toplevel_ref_arg )] diff --git a/gen/lib/src/lib.rs b/gen/lib/src/lib.rs index dd7d5155..4329628f 100644 --- a/gen/lib/src/lib.rs +++ b/gen/lib/src/lib.rs @@ -9,11 +9,28 @@ #![allow(dead_code)] #![allow( + clippy::cast_sign_loss, + clippy::default_trait_access, + clippy::enum_glob_use, clippy::inherent_to_string, + clippy::items_after_statements, + clippy::match_bool, + clippy::match_on_vec_items, + clippy::match_same_arms, + clippy::missing_errors_doc, + clippy::module_name_repetitions, + clippy::needless_pass_by_value, clippy::new_without_default, clippy::nonminimal_bool, + clippy::option_if_let_else, clippy::or_fun_call, + clippy::redundant_else, + clippy::shadow_unrelated, + clippy::similar_names, + clippy::single_match_else, + clippy::struct_excessive_bools, clippy::too_many_arguments, + clippy::too_many_lines, clippy::toplevel_ref_arg )] diff --git a/macro/src/lib.rs b/macro/src/lib.rs index 1498bbb6..fc7828b1 100644 --- a/macro/src/lib.rs +++ b/macro/src/lib.rs @@ -1,11 +1,27 @@ #![allow( + clippy::cast_sign_loss, + clippy::default_trait_access, + clippy::doc_markdown, + clippy::enum_glob_use, + clippy::filter_map, clippy::inherent_to_string, + clippy::items_after_statements, clippy::large_enum_variant, + clippy::match_bool, + clippy::match_same_arms, + clippy::module_name_repetitions, + clippy::needless_pass_by_value, clippy::new_without_default, clippy::nonminimal_bool, + clippy::option_if_let_else, clippy::or_fun_call, + clippy::redundant_else, + clippy::shadow_unrelated, + clippy::similar_names, clippy::single_match, + clippy::single_match_else, clippy::too_many_arguments, + clippy::too_many_lines, clippy::toplevel_ref_arg, clippy::useless_let_if_seq )] diff --git a/src/lib.rs b/src/lib.rs index d7cead0c..43b7677a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -369,11 +369,17 @@ #![allow( clippy::cognitive_complexity, clippy::declare_interior_mutable_const, + clippy::doc_markdown, + clippy::empty_enum, clippy::inherent_to_string, + clippy::items_after_statements, clippy::large_enum_variant, clippy::len_without_is_empty, + clippy::missing_errors_doc, clippy::missing_safety_doc, clippy::module_inception, + clippy::module_name_repetitions, + clippy::must_use_candidate, clippy::needless_doctest_main, clippy::new_without_default, clippy::or_fun_call, diff --git a/tests/ffi/lib.rs b/tests/ffi/lib.rs index 2d564fac..7d7ff9fc 100644 --- a/tests/ffi/lib.rs +++ b/tests/ffi/lib.rs @@ -1,9 +1,15 @@ #![allow( clippy::boxed_local, + clippy::cast_possible_truncation, clippy::just_underscores_and_digits, + clippy::let_underscore_drop, + clippy::must_use_candidate, + clippy::needless_pass_by_value, clippy::ptr_arg, clippy::trivially_copy_pass_by_ref, - clippy::unnecessary_wraps + clippy::unnecessary_wraps, + clippy::unused_self, + clippy::used_underscore_binding )] pub mod cast; diff --git a/tests/test.rs b/tests/test.rs index 273abe9c..d826ecba 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -1,4 +1,13 @@ -#![allow(clippy::assertions_on_constants, clippy::float_cmp, clippy::unit_cmp)] +#![allow( + clippy::assertions_on_constants, + clippy::cast_possible_truncation, + clippy::cast_possible_wrap, + clippy::float_cmp, + clippy::needless_pass_by_value, + clippy::redundant_closure_for_method_calls, + clippy::unit_cmp, + clippy::unseparated_literal_suffix +)] use cxx::SharedPtr; use cxx_test_suite::module::ffi2; diff --git a/tests/unique_ptr.rs b/tests/unique_ptr.rs index e5eb66bc..bbaa3164 100644 --- a/tests/unique_ptr.rs +++ b/tests/unique_ptr.rs @@ -1,3 +1,5 @@ +#![allow(clippy::let_underscore_drop)] + use cxx::{CxxString, UniquePtr}; #[test]