Skip to content

Pre commit (#71)

Pre commit (#71) #235

Workflow file for this run

name: Lint
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: stable
- name: Run go fmt
run: go fmt ./...
- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports@latest
- name: Run goimports
run: goimports -w .
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout=5m
- name: Run go mod tidy
run: go mod tidy && git diff --exit-code || (echo "Run 'go mod tidy' locally and commit changes." && exit 1)