Skip to content

Commit

Permalink
chore: Error when grammar.peg contains uncommitted changes (#4)
Browse files Browse the repository at this point in the history
* Error when grammar.peg contains uncommitted changes

* Make check part of lint workflow

* Correctly set exit code when erroring
  • Loading branch information
robinvdvleuten authored Aug 1, 2023
1 parent ca08d48 commit 033287d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- run: go install github.com/pointlander/[email protected]
- run: go generate
- uses: tj-actions/verify-changed-files@v16
id: verify-unchanged-grammar
with:
files: |
grammar.peg.go
- if: steps.verify-unchanged-grammar.outputs.files_changed == 'true'
run: echo "::error file=grammar.peg.go::Make sure you regenerate grammar.peg when making any changes" && exit 1
- uses: golangci/golangci-lint-action@v3

0 comments on commit 033287d

Please sign in to comment.