Skip to content

Commit

Permalink
checkout the main rustfmt.toml prior to running CI
Browse files Browse the repository at this point in the history
this is necessary so that patches can't sneak through by
modifying rustfmt.toml to bypass a CI checke.
  • Loading branch information
bunnie committed Jan 11, 2024
1 parent da60e82 commit ca5845c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/rustfmt_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ jobs:
rustup toolchain install nightly
rustup component add rustfmt --toolchain nightly
- name: Ensure the `main` branch rustfmt is applied for the run
run: git checkout main rustfmt.toml

- name: Run cargo +nightly fmt --check
run: cargo +nightly fmt --check

Expand Down

0 comments on commit ca5845c

Please sign in to comment.