golang lint, 检查go项目代码错误 https://github.com/golangci/golangci-lint

天问 55a84a660c Update 'README.md' 2 months ago
README.md 55a84a660c Update 'README.md' 2 months ago

README.md

golangci-lint

golang lint, 检查go项目代码错误

Usage

# binary will be $(go env GOPATH)/bin/golangci-lint
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.57.2

golangci-lint run

或者docker运行:

docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.57.2 golangci-lint run -v

当然可以配置 gihtub action 执行

推荐 docker方式即插即用。

Reference

https://golangci-lint.run/

https://github.com/golangci/golangci-lint