Skip to content

Linting workflows

Linting workflows #5

Workflow file for this run

name: linting
on: ["push", "pull_request"]
jobs:
ci:
name: "run linting"
strategy:
fail-fast: true
matrix:
os: ["ubuntu-latest"]
go: ["1.23.x"]
runs-on: ${{ matrix.os }}
steps:
- name: "checkout"
uses: actions/checkout@v2
- name: "fetch unshallow"
run: git fetch --prune --unshallow
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: "fmt"
run: if [ "$(go fmt ./... | wc -l)" -gt 0 ]; then echo "go fmt failed, please run again locally"; exit 1; fi
- name: "imports"
run: "go install honnef.co/go/tools/cmd/staticcheck@latest"
run: if [ "$(goimports -l . | wc -l)" -gt 0 ]; then echo "goimports failed, please run again locally"; exit 1; fi

Check failure on line 27 in .github/workflows/linting.yml

View workflow run for this annotation

GitHub Actions / linting

Invalid workflow file

The workflow is not valid. .github/workflows/linting.yml (Line: 27, Col: 7): 'run' is already defined .github/workflows/linting.yml (Line: 32, Col: 7): 'run' is already defined
- name: "vet"
run: "go vet ./..."
- name: staticcheck
run: "go install honnef.co/go/tools/cmd/staticcheck@latest"
run: "staticcheck ./..."