diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a58992d52ec..a1366aff830 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,6 +28,16 @@ jobs: cargo fmt --all --manifest-path $manifest --check done + # Ensure there are no clippy warnings + clippy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: rustup update stable && rustup default stable + - run: rustup component add clippy + # Only check cargo lib for now + - run: cargo clippy -p cargo --lib -- -D warnings + test: runs-on: ${{ matrix.os }} env: diff --git a/src/cargo/lib.rs b/src/cargo/lib.rs index 435d582a378..9f14e5381bd 100644 --- a/src/cargo/lib.rs +++ b/src/cargo/lib.rs @@ -4,6 +4,7 @@ // Due to some of the default clippy lints being somewhat subjective and not // necessarily an improvement, we prefer to not use them at this time. #![allow(clippy::all)] +#![warn(clippy::self_named_module_files)] #![allow(rustdoc::private_intra_doc_links)] //! # Cargo as a library