Skip to content

Commit

Permalink
fix regex for generated files
Browse files Browse the repository at this point in the history
Signed-off-by: Jimmy Zelinskie <jimmy@zelinskie.com>
  • Loading branch information
jzelinskie committed Oct 21, 2021
1 parent bffe36f commit f724c70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitattributes
@@ -1,2 +1,3 @@
*.pb.go -diff linguist-generated=true
*.pb.*.go -diff linguist-generated=true
go.sum -diff linguist-generated=true
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Expand Up @@ -26,14 +26,14 @@ jobs:
run: "go mod tidy && bash -c '[ $(git status --porcelain | tee /dev/fd/2 | wc -c) -eq 0 ]'"
- name: "Formatting (gofumpt)"
run: |
GOFUMPT_OUTPUT="$(find . -iname '*.go' -type f | grep -v pb.validate.go | grep -v pb.go | grep -v pb.fix.go | xargs gofumports -d)"
GOFUMPT_OUTPUT="$(find . -iname '*.go' -type f | grep -v pb.go | grep -v 'pb.*.go' | xargs gofumports -d)"
if [ -n "$GOFUMPT_OUTPUT" ]; then
echo "All the following files are not correctly formatted"
echo "${GOFUMPT_OUTPUT}"
exit 1
fi
- name: "Linting (revive)"
run: "bash -c '[ $(find . -iname '*.go' -type f | grep -v pb.fix.go | xargs revive | tee /dev/fd/2 | wc -c) -eq 0 ]'"
run: "bash -c '[ $(find . -iname '*.go' -type f | grep -v 'pb.*.go' | xargs revive | tee /dev/fd/2 | wc -c) -eq 0 ]'"

test:
name: "Test"
Expand Down

0 comments on commit f724c70

Please sign in to comment.