diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60b5974ff..0b82cd99b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -96,8 +96,7 @@ jobs: clippy: name: Clippy runs-on: ubuntu-latest - #if: github.event_name != 'pull_request' - if: false # Clippy crash: https://github.com/rust-lang/rust-clippy/issues/7423 + if: github.event_name != 'pull_request' steps: - uses: actions/checkout@v2 - uses: dtolnay/rust-toolchain@clippy diff --git a/gen/build/src/lib.rs b/gen/build/src/lib.rs index 63b2cf63f..b8a463c3a 100644 --- a/gen/build/src/lib.rs +++ b/gen/build/src/lib.rs @@ -51,6 +51,7 @@ clippy::doc_markdown, clippy::drop_copy, clippy::enum_glob_use, + clippy::if_same_then_else, clippy::inherent_to_string, clippy::items_after_statements, clippy::let_underscore_drop, diff --git a/gen/cmd/src/main.rs b/gen/cmd/src/main.rs index f419dad46..1c15db637 100644 --- a/gen/cmd/src/main.rs +++ b/gen/cmd/src/main.rs @@ -3,6 +3,7 @@ clippy::cognitive_complexity, clippy::default_trait_access, clippy::enum_glob_use, + clippy::if_same_then_else, clippy::inherent_to_string, clippy::items_after_statements, clippy::large_enum_variant, diff --git a/gen/lib/src/lib.rs b/gen/lib/src/lib.rs index e3eca5e76..411953b22 100644 --- a/gen/lib/src/lib.rs +++ b/gen/lib/src/lib.rs @@ -12,6 +12,7 @@ clippy::cast_sign_loss, clippy::default_trait_access, clippy::enum_glob_use, + clippy::if_same_then_else, clippy::inherent_to_string, clippy::items_after_statements, clippy::match_bool, diff --git a/macro/src/derive.rs b/macro/src/derive.rs index 2f770951f..ea36e3e38 100644 --- a/macro/src/derive.rs +++ b/macro/src/derive.rs @@ -151,6 +151,7 @@ fn struct_default(strct: &Struct, span: Span) -> TokenStream { let fields = strct.fields.iter().map(|field| &field.name.rust); quote_spanned! {span=> + #[allow(clippy::derivable_impls)] // different spans than the derived impl impl #generics ::std::default::Default for #ident #generics { fn default() -> Self { #ident { diff --git a/macro/src/lib.rs b/macro/src/lib.rs index fe5e6e125..324881d85 100644 --- a/macro/src/lib.rs +++ b/macro/src/lib.rs @@ -3,7 +3,7 @@ clippy::default_trait_access, clippy::doc_markdown, clippy::enum_glob_use, - clippy::filter_map, + clippy::if_same_then_else, clippy::inherent_to_string, clippy::items_after_statements, clippy::large_enum_variant,