mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
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:
parent
40ba801eed
commit
b124300365
9
.github/workflows/golang-analysis.yml
vendored
9
.github/workflows/golang-analysis.yml
vendored
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user