From a61cc23a96a417843882128e188da76a26e4364b Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Tue, 15 Jun 2021 22:38:24 +0200 Subject: [PATCH 1/5] Remove `clippy::pub_enum_variant_names` as been removed in Rust 1.53 --- lints.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lints.rs b/lints.rs index eda95e5..0332c16 100644 --- a/lints.rs +++ b/lints.rs @@ -1,4 +1,4 @@ -// BEGIN - Embark standard lints v0.3 +// BEGIN - Embark standard lints v0.4 // do not change or add/remove here, but one can add exceptions after this section // for more info see: #![deny(unsafe_code)] @@ -33,10 +33,9 @@ clippy::needless_borrow, clippy::needless_continue, clippy::option_option, - clippy::pub_enum_variant_names, clippy::ref_option_ref, clippy::rest_pat_in_fully_bound_structs, - clippy::string_add_assign, + clippy::string_add_assign, clippy::string_add, clippy::string_to_string, clippy::suboptimal_flops, @@ -51,4 +50,4 @@ )] // END - Embark standard lints v0.3 // crate-specific exceptions: -#![allow()] \ No newline at end of file +#![allow()] From 9fd76c5ecbe3329b87c946f01be654ad5be253ad Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Tue, 15 Jun 2021 22:40:27 +0200 Subject: [PATCH 2/5] Add additional lints that we've been testing with in Ark --- lints.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lints.rs b/lints.rs index 0332c16..ef3f032 100644 --- a/lints.rs +++ b/lints.rs @@ -5,23 +5,31 @@ #![warn( clippy::all, clippy::await_holding_lock, + clippy::char_lit_as_u8, + clippy::checked_conversions, clippy::dbg_macro, clippy::debug_assert_with_mut_call, clippy::doc_markdown, clippy::empty_enum, clippy::enum_glob_use, clippy::exit, + clippy::expl_impl_clone_on_copy, + clippy::explicit_deref_methods, clippy::explicit_into_iter_loop, + clippy::fallible_impl_from, clippy::filter_map_next, + clippy::float_cmp_const, clippy::fn_params_excessive_bools, clippy::if_let_mutex, clippy::imprecise_flops, clippy::inefficient_to_string, + clippy::invalid_upcast_comparisons, clippy::large_types_passed_by_value, clippy::let_unit_value, clippy::linkedlist, clippy::lossy_float_literal, clippy::macro_use_imports, + clippy::manual_ok_or, clippy::map_err_ignore, clippy::map_flatten, clippy::map_unwrap_or, @@ -30,20 +38,29 @@ clippy::match_wildcard_for_single_variants, clippy::mem_forget, clippy::mismatched_target_os, + clippy::mut_mut, + clippy::mutex_integer, clippy::needless_borrow, clippy::needless_continue, clippy::option_option, + clippy::path_buf_push_overwrite, + clippy::ptr_as_ptr, clippy::ref_option_ref, clippy::rest_pat_in_fully_bound_structs, + clippy::same_functions_in_if_condition, clippy::string_add_assign, clippy::string_add, + clippy::string_lit_as_bytes, clippy::string_to_string, clippy::suboptimal_flops, clippy::todo, + clippy::trait_duplication_in_bounds, clippy::unimplemented, clippy::unnested_or_patterns, clippy::unused_self, + clippy::useless_transmute, clippy::verbose_file_reads, + clippy::zero_sized_map_values, future_incompatible, nonstandard_style, rust_2018_idioms From a0f6e6659eabfe72435da9836c2d34b06014ae10 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Tue, 15 Jun 2021 23:24:41 +0200 Subject: [PATCH 3/5] Removed `suboptimal_flops` --- lints.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/lints.rs b/lints.rs index ef3f032..18966b4 100644 --- a/lints.rs +++ b/lints.rs @@ -52,7 +52,6 @@ clippy::string_add, clippy::string_lit_as_bytes, clippy::string_to_string, - clippy::suboptimal_flops, clippy::todo, clippy::trait_duplication_in_bounds, clippy::unimplemented, From cb7ffa80ada279ba324bc5b0270d7a6b91097a96 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Wed, 16 Jun 2021 10:05:16 +0200 Subject: [PATCH 4/5] Fix v0.4 everywhere --- lints.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lints.rs b/lints.rs index 18966b4..4cbd4da 100644 --- a/lints.rs +++ b/lints.rs @@ -64,6 +64,6 @@ nonstandard_style, rust_2018_idioms )] -// END - Embark standard lints v0.3 +// END - Embark standard lints v0.4 // crate-specific exceptions: #![allow()] From 8a1541616d2ad65f5c7dc30c33f027080fdf8615 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Wed, 16 Jun 2021 10:06:36 +0200 Subject: [PATCH 5/5] Add `implicit_clone` and `semicolon_if_nothing_returned` --- lints.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lints.rs b/lints.rs index 4cbd4da..5179555 100644 --- a/lints.rs +++ b/lints.rs @@ -21,6 +21,7 @@ clippy::float_cmp_const, clippy::fn_params_excessive_bools, clippy::if_let_mutex, + clippy::implicit_clone, clippy::imprecise_flops, clippy::inefficient_to_string, clippy::invalid_upcast_comparisons, @@ -48,6 +49,7 @@ clippy::ref_option_ref, clippy::rest_pat_in_fully_bound_structs, clippy::same_functions_in_if_condition, + clippy::semicolon_if_nothing_returned, clippy::string_add_assign, clippy::string_add, clippy::string_lit_as_bytes,