Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable more linters #2362

Merged
merged 2 commits into from
Feb 23, 2019
Merged

Enable more linters #2362

merged 2 commits into from
Feb 23, 2019

Conversation

siggy
Copy link
Member

@siggy siggy commented Feb 23, 2019

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

@siggy siggy self-assigned this Feb 23, 2019
@siggy siggy changed the title Enable varcheck linter Enable deadcode and varcheck linters Feb 23, 2019
@siggy siggy changed the title Enable deadcode and varcheck linters Enable more linters Feb 23, 2019
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>
.golangci.yml Outdated
# - dupl
# - gochecknoglobals
# - gochecknoinits
# - goconst # TODO
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double TODO ;)

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
@siggy siggy merged commit b9b8eb4 into master Feb 23, 2019
@siggy siggy deleted the siggy/varcheck-lint branch February 23, 2019 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants