Skip to content

Commit

Permalink
Generate PR suggestions when formatting is wrong
Browse files Browse the repository at this point in the history
This should make it much easier to do drive-by changes in the GitHub
editor: the comment should contain a diff that can be committed
directly from the online editor.
  • Loading branch information
mgeisler committed Oct 5, 2024
1 parent 7a25c4a commit 505dd6c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,21 @@ jobs:
run: |
sudo apt update
sudo apt install gettext yapf3
curl -fsSL https://dprint.dev/install.sh | sh
echo "/home/runner/.dprint/bin" >> $GITHUB_PATH
- name: Install nightly rustfmt
run: |
rustup default nightly
rustup component add rustfmt
- name: Check formatting
uses: dprint/[email protected]
- name: Reformat
run: dprint fmt

- uses: parkerbxyz/suggest-changes@v1

- name: Check if there were any changes
run: git diff --exit-code

typos:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 505dd6c

Please sign in to comment.