Reference:
https://github.com/golangci/awesome-go-linters
https://drive.google.com/file/d/1XhIshGdMMq2KxDdOIh100eYnXsQbm0fE/view
https://github.com/alexkohler/prealloc
https://github.com/go-critic/go-critic
https://github.com/mdempsky/maligned
https://github.com/alexkohler/nakedret
https://github.com/kyoh86/scopelint
https://staticcheck.io/docs/
https://github.com/securego/gosec
https://github.com/mgechev/revive
https://github.com/fzipp/gocyclo
$ pip install pre-commit
$ pre-commit install
$ golangci-lint run --fix
integrated revgrep in golangci-lint:
$ golangci-lint run \
--new-from-rev=$GIT_REVISION
https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml
$ .golangci.yml
https://github.com/golangci/awesome-go-linters
https://drive.google.com/file/d/1XhIshGdMMq2KxDdOIh100eYnXsQbm0fE/view
lint plugins must have:
https://github.com/golangci/golangci-linthttps://github.com/alexkohler/prealloc
https://github.com/go-critic/go-critic
https://github.com/mdempsky/maligned
https://github.com/alexkohler/nakedret
https://github.com/kyoh86/scopelint
https://staticcheck.io/docs/
https://github.com/securego/gosec
https://github.com/mgechev/revive
https://github.com/fzipp/gocyclo
tool:
https://github.com/bradleyfalzon/revgrepgit commit hooks, pre-commit:
https://github.com/golangci/golangci-lint/blob/master/.pre-commit-hooks.yaml$ pip install pre-commit
$ pre-commit install
ways to install golangci-ling:
golangci-lint cmds:
$ golangci-lint run --fast$ golangci-lint run --fix
integrated revgrep in golangci-lint:
$ golangci-lint run \
--new-from-rev=$GIT_REVISION
configure golangci:
https://github.com/golangci/golangci-lint#configurationhttps://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml
$ .golangci.yml
comment out code for not linting:
//nolint:golint,gofmt //nolint:prealloc
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.