From d42d18707365f329efed264fdcb0b88dc62ea907 Mon Sep 17 00:00:00 2001 From: Marcin Date: Mon, 12 Sep 2022 22:29:19 -0700 Subject: [PATCH 01/14] cargo clippy --- .github/workflows/CI.yml | 22 ++++++++++++++++++++++ src/lib.rs | 11 +++++++++++ 2 files changed, 33 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index e39d1e518d..f51f7d69bf 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -45,6 +45,28 @@ jobs: command: fmt args: --all -- --check + + analysis: + name: Static Code Analysis + needs: [ci-pass] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + components: rustfmt + + - name: cargo clippy + uses: actions-rs/cargo@v1 + with: + command: cargo clippy + test: name: Test ${{ matrix.rust }} on ${{ matrix.os }} needs: [style] diff --git a/src/lib.rs b/src/lib.rs index 3c56836a2f..fd35829f8d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,6 +6,17 @@ #![cfg_attr(all(test, feature = "nightly"), feature(test))] #![cfg_attr(docsrs, feature(doc_cfg))] +#![allow( + clippy::needless_borrow, + clippy::module_inception, + clippy::useless_format, + clippy::redundant_clone, + clippy::manual_non_exhaustive, + dead_code, + unused_imports +)] + + //! # hyper //! //! hyper is a **fast** and **correct** HTTP implementation written in and for Rust. From 0200111731834aa0ad5d61320fd5af67ce2e59b3 Mon Sep 17 00:00:00 2001 From: Marcin Date: Mon, 12 Sep 2022 22:36:07 -0700 Subject: [PATCH 02/14] updated. --- .github/workflows/CI.yml | 5 ++--- src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f51f7d69bf..b45fb7bae7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -14,6 +14,7 @@ jobs: runs-on: ubuntu-latest needs: - style + - clippy - test - msrv - miri @@ -45,10 +46,8 @@ jobs: command: fmt args: --all -- --check - analysis: - name: Static Code Analysis - needs: [ci-pass] + name: Static Code Analysis ( Clippy ) runs-on: ubuntu-latest steps: - name: Checkout diff --git a/src/lib.rs b/src/lib.rs index fd35829f8d..41d9e5ab91 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -15,7 +15,7 @@ dead_code, unused_imports )] - +#![deny(clippy::self_named_module_files)] //! # hyper //! From ab3c6bf32b723500e88ebaf6451ecfe076d39d8d Mon Sep 17 00:00:00 2001 From: Marcin Date: Mon, 12 Sep 2022 22:37:35 -0700 Subject: [PATCH 03/14] yaml --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b45fb7bae7..7b13ab6c72 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -46,7 +46,7 @@ jobs: command: fmt args: --all -- --check - analysis: + clippy: name: Static Code Analysis ( Clippy ) runs-on: ubuntu-latest steps: From a9b9a382d48fc10ab99448e75104198b0f9fba1c Mon Sep 17 00:00:00 2001 From: Marcin Date: Mon, 12 Sep 2022 22:38:51 -0700 Subject: [PATCH 04/14] proper component. --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7b13ab6c72..224201def4 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -59,7 +59,7 @@ jobs: profile: minimal toolchain: stable override: true - components: rustfmt + components: clippy - name: cargo clippy uses: actions-rs/cargo@v1 From 319deba8474929e1c119d4ba3f70675bc11c0ca6 Mon Sep 17 00:00:00 2001 From: Marcin Date: Mon, 12 Sep 2022 22:40:01 -0700 Subject: [PATCH 05/14] up. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 41d9e5ab91..a134664274 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,6 @@ #![deny(missing_docs)] #![deny(missing_debug_implementations)] +#![deny(clippy::self_named_module_files)] #![cfg_attr(test, deny(rust_2018_idioms))] #![cfg_attr(all(test, feature = "full"), deny(unreachable_pub))] #![cfg_attr(all(test, feature = "full"), deny(warnings))] @@ -15,7 +16,6 @@ dead_code, unused_imports )] -#![deny(clippy::self_named_module_files)] //! # hyper //! From 70759936b21030fa3a7cf5abf1b4b5a85d11408e Mon Sep 17 00:00:00 2001 From: Marcin Date: Mon, 12 Sep 2022 22:49:52 -0700 Subject: [PATCH 06/14] style. --- src/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index a134664274..465c0afd63 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,15 +6,14 @@ #![cfg_attr(all(test, feature = "full"), deny(warnings))] #![cfg_attr(all(test, feature = "nightly"), feature(test))] #![cfg_attr(docsrs, feature(doc_cfg))] - #![allow( clippy::needless_borrow, clippy::module_inception, clippy::useless_format, clippy::redundant_clone, clippy::manual_non_exhaustive, - dead_code, - unused_imports + + )] //! # hyper From 6133d3eadc505c652ecf0956b506a287bf1a1edd Mon Sep 17 00:00:00 2001 From: Marcin Date: Mon, 12 Sep 2022 22:50:56 -0700 Subject: [PATCH 07/14] dis-allow --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 465c0afd63..6566556974 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,8 +12,8 @@ clippy::useless_format, clippy::redundant_clone, clippy::manual_non_exhaustive, - - + dead_code, + unused_imports )] //! # hyper From 1a2e2145efa7fde5f73747c89500ab7dc2273cf4 Mon Sep 17 00:00:00 2001 From: Marcin Date: Mon, 12 Sep 2022 22:52:40 -0700 Subject: [PATCH 08/14] updated. --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 224201def4..f37b706055 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -61,10 +61,10 @@ jobs: override: true components: clippy - - name: cargo clippy + - name: clippy uses: actions-rs/cargo@v1 with: - command: cargo clippy + command: clippy test: name: Test ${{ matrix.rust }} on ${{ matrix.os }} From 76ebfa477bc19e0d8c98056c306be7a810c8f4e5 Mon Sep 17 00:00:00 2001 From: Marcin Date: Mon, 12 Sep 2022 23:01:34 -0700 Subject: [PATCH 09/14] updated. --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f37b706055..764d0557f0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -61,7 +61,7 @@ jobs: override: true components: clippy - - name: clippy + - name: Clippy Check uses: actions-rs/cargo@v1 with: command: clippy From 4381359b5a9064139ca409975348b89380c46b2b Mon Sep 17 00:00:00 2001 From: Marcin Date: Wed, 21 Sep 2022 22:21:37 -0700 Subject: [PATCH 10/14] fix. --- src/lib.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 6566556974..518bc4e0b0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,8 +12,6 @@ clippy::useless_format, clippy::redundant_clone, clippy::manual_non_exhaustive, - dead_code, - unused_imports )] //! # hyper From 7b89b3156ea65ee56ee02ecebdb45b8c6498ac25 Mon Sep 17 00:00:00 2001 From: Marcin Date: Wed, 21 Sep 2022 22:24:27 -0700 Subject: [PATCH 11/14] fixed format. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 45488b92ee..13c61e54ab 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,7 +11,7 @@ clippy::module_inception, clippy::useless_format, clippy::redundant_clone, - clippy::manual_non_exhaustive, + clippy::manual_non_exhaustive )] //! # hyper From 7ff325b6d4494a5eeccaf05cf9e58a1dd775439f Mon Sep 17 00:00:00 2001 From: Marcin Date: Thu, 22 Sep 2022 21:35:41 -0700 Subject: [PATCH 12/14] up. --- src/lib.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 13c61e54ab..2bd4d759d3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,18 +1,10 @@ #![deny(missing_docs)] #![deny(missing_debug_implementations)] -#![deny(clippy::self_named_module_files)] #![cfg_attr(test, deny(rust_2018_idioms))] #![cfg_attr(all(test, feature = "full"), deny(unreachable_pub))] #![cfg_attr(all(test, feature = "full"), deny(warnings))] #![cfg_attr(all(test, feature = "nightly"), feature(test))] #![cfg_attr(docsrs, feature(doc_cfg))] -#![allow( - clippy::needless_borrow, - clippy::module_inception, - clippy::useless_format, - clippy::redundant_clone, - clippy::manual_non_exhaustive -)] //! # hyper //! From d9ff2b7125e49dd8053fab4bc2d5e0f158e22ce6 Mon Sep 17 00:00:00 2001 From: Marcin Date: Thu, 22 Sep 2022 21:37:44 -0700 Subject: [PATCH 13/14] Updated. --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c40df75741..ff36487aff 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -68,6 +68,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: clippy + args: -- -Aclippy::all -Wclippy::self_named_module_files test: name: Test ${{ matrix.rust }} on ${{ matrix.os }} From edd0f539e95480937cc1bbd29175103ae6ad33c2 Mon Sep 17 00:00:00 2001 From: Marcin Date: Mon, 3 Oct 2022 22:04:40 -0700 Subject: [PATCH 14/14] Deny! --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ff36487aff..bf6aed0bad 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -68,7 +68,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: clippy - args: -- -Aclippy::all -Wclippy::self_named_module_files + args: -- -Aclippy::all -Dclippy::self_named_module_files test: name: Test ${{ matrix.rust }} on ${{ matrix.os }}