Skip to content

Commit

Permalink
Enable more linters
Browse files Browse the repository at this point in the history
Enables the following linters:
- `deadcode` finds unused code.
- `depguard` checks if package imports are in a list of acceptable
  packages.
- `misspell` finds commonly misspelled English words in comments.
- `nakedret` finds naked returns in functions greater than a specified
  function length.
- `varcheck` finds unused global variables and constants.

Our repo was already passing these linters so no fixes needed.

Part of #217

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
  • Loading branch information
siggy committed Feb 23, 2019
1 parent cc3ff70 commit e797963
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,26 @@ linters:
enable:
- gofmt
- golint
- depguard
- misspell
- nakedret
# TODO: enable more linters!
# - dupl
# - gochecknoglobals
# - gochecknoinits
# - goconst # TODO
# - gocyclo
# - goimports
# - gosec
# - interfacer
# - lll
# - maligned
# - prealloc
# - scopelint
# - stylecheck
# - unconvert
# - unparam
disable:
- deadcode
- errcheck
- staticcheck
- structcheck
- varcheck

0 comments on commit e797963

Please sign in to comment.