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

Reconsider enabled linters #1002

Closed
rfratto opened this issue Sep 10, 2019 · 2 comments
Closed

Reconsider enabled linters #1002

rfratto opened this issue Sep 10, 2019 · 2 comments
Labels
good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! stale A stale issue or PR that will automatically be closed.

Comments

@rfratto
Copy link
Member

rfratto commented Sep 10, 2019

We enable the following linters:

- deadcode
- errcheck
- goconst
- gofmt
- goimports
- golint
- gosimple
- ineffassign
- megacheck
- misspell
- structcheck
- unconvert
- unparam
- varcheck
- govet
- unused # new from here.
- interfacer
- typecheck

At least interfacer and megacheck are deprecated and should likely be removed. interfacer in particular has questionable usability and can be prone to false-positives.

The list of enabled linters should be fully re-considered and whittled down to a more appropriate list.

@rfratto rfratto added good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! labels Sep 10, 2019
@pracucci
Copy link
Contributor

pracucci commented Oct 8, 2019

I checked all the available linters and I would suggest:

  • Remove interfacer
  • Replace megacheck with staticcheck
  • Add prealloc: finds slice declarations that could potentially be preallocated

Any feedback?

@stale
Copy link

stale bot commented Nov 7, 2019

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale A stale issue or PR that will automatically be closed. label Nov 7, 2019
@stale stale bot closed this as completed Nov 14, 2019
cyriltovena pushed a commit to cyriltovena/loki that referenced this issue Jun 11, 2021
dannykopping pushed a commit to dannykopping/loki that referenced this issue Sep 19, 2021
Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
dannykopping pushed a commit that referenced this issue Sep 21, 2021
* Fixing CI deprecations

Replacing deprecated golint with revive (golangci/golangci-lint#1965)

Removing interfacer (golangci/golangci-lint#1755)

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>

* Further suggestions from Marco in #1002

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>

* Clarify instruction

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! stale A stale issue or PR that will automatically be closed.
Projects
None yet
Development

No branches or pull requests

2 participants