Add staticcheck #203

Merged
fyrchik merged 1 commit from dstepanov-yadro/frostfs-node:refactoring/staticcheck into master 2023-07-26 21:07:57 +00:00
2 changed files with 12 additions and 0 deletions

View file

@ -43,3 +43,8 @@ repos:
pass_filenames: false pass_filenames: false
types: [go] types: [go]
language: system language: system
- repo: https://github.com/TekWizely/pre-commit-golang
rev: v1.0.0-rc.1
hooks:
- id: go-staticcheck-repo-mod

View file

@ -128,10 +128,17 @@ test:
@echo "⇒ Running go test" @echo "⇒ Running go test"
@go test ./... @go test ./...
pre-commit-run:
@pre-commit run -a --hook-stage manual
# Run linters # Run linters
lint: lint:
@golangci-lint --timeout=5m run @golangci-lint --timeout=5m run
# Run staticcheck
staticcheck:
@staticcheck ./...
# Run linters in Docker # Run linters in Docker
docker/lint: docker/lint:
docker run --rm -t \ docker run --rm -t \