Skip to content

Commit

Permalink
Fix linter sug.
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanSchroeder committed May 27, 2023
1 parent 2a7abc6 commit 416188b
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 5 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Audit

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:

audit:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19

- name: Verify dependencies
run: go mod verify

- name: Build
run: go build -v ./...

- name: Run go vet
run: go vet ./...

- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest

- name: Run staticcheck
run: staticcheck ./...

- name: Install golint
run: go install golang.org/x/lint/golint@latest

- name: Run golint
run: golint ./...

- name: Run tests
run: go test -race -vet=off ./...
20 changes: 15 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,21 @@ jobs:
- name: Check out code
uses: actions/checkout@v1

- name: Lint Go Code
run: |
export PATH=$PATH:$(go env GOPATH)/bin # temporary fix. See https://github.com/actions/setup-go/issues/14
go get golang.org/x/lint/golint
make lint

- name: Run go vet
run: go vet ./...

- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest

- name: Run staticcheck
run: staticcheck ./...

- name: Install golint
run: go install golang.org/x/lint/golint@latest

- name: Run golint
run: golint ./...

test:
name: Test
Expand Down

0 comments on commit 416188b

Please sign in to comment.