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

[linter]enable linters for golangci #1158

Closed
24 of 25 tasks
silenceper opened this issue Sep 15, 2020 · 18 comments · Fixed by #1221, #1267, #1268 or #1393
Closed
24 of 25 tasks

[linter]enable linters for golangci #1158

silenceper opened this issue Sep 15, 2020 · 18 comments · Fixed by #1221, #1267, #1268 or #1393
Labels
feature-request All issues for new features that have not been committed to good first issue Good for newcomers Hacktoberfest stale All issues that are marked as stale due to inactivity

Comments

@silenceper
Copy link
Contributor

silenceper commented Sep 15, 2020

In order to improve code quality, we should enable more linters in the golangci tool:

  • gofmt
  • golint
  • interfacer
  • goimports
  • ineffassign
  • misspell
  • scopelint
  • structcheck
  • bodyclose
  • deadcode
  • depguard
  • dogsled
  • errcheck
  • funlen
  • goconst
  • gocritic
  • gocyclo
  • gosimple
  • staticcheck
  • stylecheck
  • unused
  • varcheck
  • unparam
  • unconvert
  • whitespace

How to enable?

@silenceper
Copy link
Contributor Author

golint,gofmt was add in #1159

@silenceper
Copy link
Contributor Author

/good-first-issue

@ShaileshSurya
Copy link

@silenceper With all the lint's this looks like a big change. How do you expect this to be committed.

One way I see is that breaking this list of lints into smaller lists and creating PR with respect to each of those subgroups. What do you say?

Also the hactoberfest is still days away. When are you expecting this to be committed?

@silenceper
Copy link
Contributor Author

If you add all lints at once, it will be a big change, so my suggestion is to split each lint into a separate pr for submission.

@silenceper
Copy link
Contributor Author

silenceper commented Oct 1, 2020

goimport was add in #1205
misspell, bodyclose was add in #1206

@silenceper
Copy link
Contributor Author

/open

@zroubalik zroubalik reopened this Oct 6, 2020
agneum added a commit to agneum/keda that referenced this issue Oct 17, 2020
agneum added a commit to agneum/keda that referenced this issue Oct 17, 2020
agneum added a commit to agneum/keda that referenced this issue Oct 17, 2020
zroubalik pushed a commit that referenced this issue Oct 19, 2020
@silenceper
Copy link
Contributor Author

@zroubalik please reopen.

@zroubalik zroubalik reopened this Oct 19, 2020
@zroubalik
Copy link
Member

@silenceper thanks, it was automatically closed by the linked PR.

@silenceper
Copy link
Contributor Author

silenceper commented Oct 23, 2020

@zroubalik please reopen ,thanks . 🤣

it was automatically closed again.

@zroubalik zroubalik reopened this Oct 23, 2020
@daxmc99 daxmc99 mentioned this issue Oct 28, 2020
2 tasks
@girishramnani
Copy link
Contributor

I am currently working on enabling gocyclo

@Shubham82
Copy link
Contributor

I have created a PR for enable goconst in .golangci.yml #1341

@girishramnani
Copy link
Contributor

It seems there is already a PR for goconst #1296

@girishramnani
Copy link
Contributor

@zroubalik if you could please check off the gocyclo box so that it’s not picked up by mistake by someone.

@Shubham82
Copy link
Contributor

Hi folks,
I have created a PR for enbale depguard and dogsled Linters in .golangcli.yml #1374

@Shubham82
Copy link
Contributor

I am currently working on enabling gocritic

@Ritikaa96
Copy link
Contributor

Hi, I'm working on enabling errcheck

@stale
Copy link

stale bot commented Oct 14, 2021

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

@stale stale bot added the stale All issues that are marked as stale due to inactivity label Oct 14, 2021
@stale
Copy link

stale bot commented Oct 21, 2021

This issue has been automatically closed due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request All issues for new features that have not been committed to good first issue Good for newcomers Hacktoberfest stale All issues that are marked as stale due to inactivity
Projects
None yet
6 participants