[ci] Add lint-ignore comment to generated files

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
This commit is contained in:
Julian Strobl 2023-07-20 08:30:02 +02:00
parent b0e12a8f7d
commit 6037c6009c
No known key found for this signature in database
GPG Key ID: E0A8F9AD733499A7

View File

@ -31,7 +31,13 @@ jobs:
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Run staticcheck
run: staticcheck ./...
env:
LINT: "//lint:file-ignore SA1019 Ignore all deprecation errors, it's generated"
run: |
# Add lint-ignore comment to beginning of files
sed -i "1i${LINT}" ./x/asset/types/query.pb.gw.go
sed -i "1i${LINT}" ./x/machine/types/query.pb.gw.go
staticcheck ./...
- name: Install golangci-lint
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest