| 1 | name: Lint |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches-ignore: |
| 6 | - 'main' |
| 7 | - 'docs' |
| 8 | |
| 9 | jobs: |
| 10 | lint: |
| 11 | runs-on: ubuntu-24.04 # latest |
| 12 | |
| 13 | steps: |
| 14 | - name: Checkout Source |
| 15 | uses: actions/checkout@v4 |
| 16 | |
| 17 | - name: Format and Check Diff |
| 18 | # run formatting script, which edits files in place |
| 19 | # then do `git diff` to show what changed (if anything) |
| 20 | # then do `git diff --quiet` to fail if anything changed |
| 21 | run: | |
| 22 | python3 -m pip install --upgrade autopep8 |
| 23 | python3 scripts/format-all.py |
| 24 | git diff |
| 25 | git diff --quiet |