Skip to content

Commit

Permalink
feat: add go linting
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikaverpil committed May 12, 2024
1 parent 11e8e7b commit 7a74e62
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,27 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --check .

go:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.22
- name: Check linting
run: go vet ./...
working-directory: ./tests/go
- name: Check imports
run: |
go install github.com/daixiang0/gci@latest
gci write --skip-generated -s standard -s default --skip-vendor .
working-directory: ./tests/go
- name: Check golines
run: |
go install mvdan.cc/gofumpt@latest
go install github.com/segmentio/golines@latest
golines --base-formatter=gofumpt --ignore-generated --tab-len=1 --max-len=120 --write-output .
working-directory: ./tests/go

0 comments on commit 7a74e62

Please sign in to comment.