cfdeploy
cfdeploy copied to clipboard
Fix gometalinter config and lint issues
Makefile incorrectly calls gometalinter; it should use ./... and --skip=vendor, not $$(go list ./... | grep -v /vendor/)
To fix, we'll most likely want to disable noisy linters and turn them back on one-by-one as we fix lint issues.
Linters that don't produce warnings and can be enabled immediately:
- structcheck
- aligncheck
- deadcode
- ineffassign
- varcheck
- interfacer
- goconst
- gosimple
- staticcheck
- unparam
- gas
- safesql
Linters that produce warnings (in order of quantity of warnings) and require code fixes before enabling:
- goimports (1 warning)
- vet (1 warning)
- golint (1 warning)
- dupl (2 warnings)
- misspell (2 warnings)
- errcheck (3 warnings)
- gocyclo (6 warnings)
- unused (24 warnings)
- lll (35 warnings)
- gotype (170 warnings)
Created a PR to resolve.
Linters not yet enabled in PR:
- dupl (2 warnings)
- errcheck (3 warnings)
- gocyclo (6 warnings)
- unused (24 warnings)
- lll (35 warnings)
- gotype (170 warnings)