feat(ci): add go fix check to Go analysis workflow

ensures Go 1.26 modernizers are applied, fails CI if `go fix ./...`
produces any changes (similar to existing `go fmt` enforcement)
This commit is contained in:
Marcin Rataj 2026-02-11 00:21:15 +01:00
parent 40ba801eed
commit b124300365

View File

@ -47,6 +47,15 @@ jobs:
echo "$out"
exit 1
fi
- name: go fix
if: always() # run this step even if the previous one failed
run: |
go fix ./...
if [[ -n $(git diff --name-only) ]]; then
echo "go fix produced changes. Run 'go fix ./...' locally and commit the result."
git diff
exit 1
fi
- name: go vet
if: always() # run this step even if the previous one failed
uses: protocol/multiple-go-modules@v1.4