cfdeploy icon indicating copy to clipboard operation
cfdeploy copied to clipboard

Fix gometalinter config and lint issues

Open ryan0x44 opened this issue 8 years ago • 2 comments

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.

ryan0x44 avatar Sep 21 '17 18:09 ryan0x44

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)

ryan0x44 avatar Sep 21 '17 18:09 ryan0x44

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)

ryan0x44 avatar Sep 21 '17 18:09 ryan0x44