Skip to content

Commit 9f86496

Browse files
committed
ci: Check for exclude/replace directives
To not accidentally break `go install`, let's add CI to check it. If in the future we need those directives, we can remove the CI check. Signed-off-by: Rodrigo Campos <[email protected]>
1 parent 8ba0a16 commit 9f86496

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/workflows/validate.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ jobs:
147147
- name: no toolchain in go.mod # See https://github.com/opencontainers/runc/pull/4717, https://github.com/dependabot/dependabot-core/issues/11933.
148148
run: |
149149
if grep -q '^toolchain ' go.mod; then echo "Error: go.mod must not have toolchain directive, please fix"; exit 1; fi
150+
- name: no exclude nor replace in go.mod
151+
run: |
152+
if grep -Eq '^\s*(exclude|replace) ' go.mod; then echo "Error: go.mod must not have exclude/replace directive, it breaks go install. Please fix"; exit 1; fi
150153
151154
152155
commit:

0 commit comments

Comments
 (0)