Skip to content

Commit

Permalink
Enable more linters (#2362)
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.

Also explicitly list all linters enabled by default, for reference.

Part of #217

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
  • Loading branch information
siggy authored Feb 23, 2019
1 parent cc3ff70 commit b9b8eb4
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,35 @@ issues:
exclude-use-default: false
linters:
enable:
- deadcode
- depguard
- gofmt
- golint
- gosimple
- govet
- ineffassign
- misspell
- nakedret
- typecheck
- unused
- varcheck
# TODO: enable more linters!
# - dupl
# - gochecknoglobals
# - gochecknoinits
# - goconst
# - gocyclo
# - goimports
# - gosec
# - interfacer
# - lll
# - maligned
# - prealloc
# - scopelint
# - stylecheck
# - unconvert
# - unparam
disable:
- deadcode
- errcheck
- staticcheck
- structcheck
- varcheck

0 comments on commit b9b8eb4

Please sign in to comment.