forked from TrueCloudLab/frostfs-node
[#203] node: Add staticcheck target and pre-commit
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
4ec69cbbf8
commit
9027695371
2 changed files with 12 additions and 0 deletions
|
@ -43,3 +43,8 @@ repos:
|
|||
pass_filenames: false
|
||||
types: [go]
|
||||
language: system
|
||||
|
||||
- repo: https://github.com/TekWizely/pre-commit-golang
|
||||
rev: v1.0.0-rc.1
|
||||
hooks:
|
||||
- id: go-staticcheck-repo-mod
|
||||
|
|
7
Makefile
7
Makefile
|
@ -128,10 +128,17 @@ test:
|
|||
@echo "⇒ Running go test"
|
||||
@go test ./...
|
||||
|
||||
pre-commit-run:
|
||||
@pre-commit run -a --hook-stage manual
|
||||
|
||||
# Run linters
|
||||
lint:
|
||||
@golangci-lint --timeout=5m run
|
||||
|
||||
# Run staticcheck
|
||||
staticcheck:
|
||||
@staticcheck ./...
|
||||
|
||||
# Run linters in Docker
|
||||
docker/lint:
|
||||
docker run --rm -t \
|
||||
|
|
Loading…
Reference in a new issue