Skip to content

Commit

Permalink
Add Go fmt to linting
Browse files Browse the repository at this point in the history
  • Loading branch information
ross-spencer committed Jul 15, 2023
1 parent 0dcdd26 commit 53abc21
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: true
matrix:
os: ["windows-latest", "ubuntu-latest", "macOS-latest"]
os: ["ubuntu-latest", "windows-latest", "macOS-latest"]
go: ["1.20.x"]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -20,8 +20,13 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- run: "go test ./..."
- run: "go vet ./..."
- name: "fmt"
run: if [ "$(go fmt ./... | wc -l)" -gt 0 ]; then echo "go fmt failed, please run again locally"; exit 1; fi
if: matrix.os == 'ubuntu-latest'
- name: "test"
run: "go test ./..."
- name: "vet"
run: "go vet ./..."
- run: "go install honnef.co/go/tools/cmd/staticcheck@latest"
- name: staticcheck
run: "staticcheck ./..."

0 comments on commit 53abc21

Please sign in to comment.