Enable staticcheck in forgejo actions #490

Merged
fyrchik merged 1 commit from acid-ant/frostfs-node:feature/482-add-staticcheck into master 2023-07-07 14:04:47 +00:00
2 changed files with 23 additions and 1 deletions

View file

@ -52,3 +52,21 @@ jobs:
- name: Run tests
run: go test ./... -count=1 -race
staticcheck:
name: Staticcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.20'
cache: true
- name: Install staticcheck
run: make staticcheck-install
- name: Run staticcheck
run: make staticcheck-run

View file

@ -135,8 +135,12 @@ pre-commit-run:
lint:
@golangci-lint --timeout=5m run
# Install staticcheck
staticcheck-install:
@go install honnef.co/go/tools/cmd/staticcheck@latest
# Run staticcheck
staticcheck:
staticcheck-run:
@staticcheck ./...
# Run linters in Docker