forked from quic-go/quic-go
ci: fail if any Go files contain an ignore directive (#4055)
This commit is contained in:
7
.github/workflows/lint.yml
vendored
7
.github/workflows/lint.yml
vendored
@@ -11,6 +11,13 @@ jobs:
|
|||||||
go-version: "1.20.x"
|
go-version: "1.20.x"
|
||||||
- name: Check that no non-test files import Ginkgo or Gomega
|
- name: Check that no non-test files import Ginkgo or Gomega
|
||||||
run: .github/workflows/no_ginkgo.sh
|
run: .github/workflows/no_ginkgo.sh
|
||||||
|
- name: Check for //go:build ignore in .go files
|
||||||
|
run: |
|
||||||
|
IGNORED_FILES=$(grep -rl '//go:build ignore' . --include='*.go') || true
|
||||||
|
if [ -n "$IGNORED_FILES" ]; then
|
||||||
|
echo "::error::Found ignored Go files: $IGNORED_FILES"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
- name: Check that go.mod is tidied
|
- name: Check that go.mod is tidied
|
||||||
run: |
|
run: |
|
||||||
cp go.mod go.mod.orig
|
cp go.mod go.mod.orig
|
||||||
|
|||||||
Reference in New Issue
Block a user