From cc8fe6213e273cc9e169d6afc72e2b48f2a72b9e Mon Sep 17 00:00:00 2001 From: Sexosexosexo Date: Wed, 6 Nov 2024 18:31:44 +0100 Subject: [PATCH] Actually run CI linting with nightly Previously the rust linting workflow downloaded nightly but didn't use it. This made the CI `fmt` checks to generate warnings since we use nightly `rustfmt` configs. --- .github/workflows/rust.yml | 4 ++-- .rustfmt.toml | 2 +- rust-toolchain.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6e9cde3d..e283c8c1 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -24,10 +24,10 @@ jobs: uses: Swatinem/rust-cache@v2 - name: Run cargo fmt - run: cargo fmt --all --check + run: cargo +nightly fmt --all --check - name: Run cargo clippy - run: cargo clippy --all-targets + run: cargo +nightly clippy --all-targets env: PWD: ${{ github.workspace }} # without it ci can't see env!("PWD") diff --git a/.rustfmt.toml b/.rustfmt.toml index 07310b7e..d92b2ff1 100644 --- a/.rustfmt.toml +++ b/.rustfmt.toml @@ -10,4 +10,4 @@ newline_style = "Unix" format_code_in_doc_comments = true # macros -format_macro_matchers = true \ No newline at end of file +format_macro_matchers = true diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 2ccabf48..b78f0b2d 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] channel = "1.74.1" components = [ "rustfmt", "clippy" ] -profile = "default" \ No newline at end of file +profile = "default"