From f83a92085fc0fb04b9226d57a4060ade736ab339 Mon Sep 17 00:00:00 2001 From: Ian Joiner <14581281+iajoiner@users.noreply.github.com> Date: Mon, 4 Nov 2024 10:56:55 -0500 Subject: [PATCH] ci: add `rustfmt.toml` and remove rustfmt config from ci --- .github/workflows/lint-and-test.yml | 8 ++++---- rustfmt.toml | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 rustfmt.toml diff --git a/.github/workflows/lint-and-test.yml b/.github/workflows/lint-and-test.yml index 9a9b1828a..7fdc86743 100644 --- a/.github/workflows/lint-and-test.yml +++ b/.github/workflows/lint-and-test.yml @@ -182,19 +182,19 @@ jobs: # files: lcov.info # fail_ci_if_error: true - # Run cargo fmt --all -- --config imports_granularity=Crate,group_imports=One --check + # Run cargo fmt --all -- --check format: name: Format runs-on: ubuntu-latest steps: - name: Checkout sources uses: actions/checkout@v3 - - name: Install stable toolchain + - name: Install nightly toolchain run: | - curl https://sh.rustup.rs -sSf | bash -s -- -y --profile minimal && source ~/.cargo/env + curl https://sh.rustup.rs -sSf | bash -s -- -y --profile minimal && source ~/.cargo/env && rustup default nightly rustup component add rustfmt - name: Run cargo fmt - run: cargo fmt --all -- --config imports_granularity=Crate,group_imports=One --check + run: cargo fmt --all -- --check udeps: name: Unused Dependencies diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 000000000..d8b5c5ccd --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,3 @@ +unstable_features = true +imports_granularity = "Crate" +group_imports = "One"