Keda: [linter]enable linters for golangci

Created on 15 Sep 2020  路  16Comments  路  Source: kedacore/keda

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

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

How to enable?

Hacktoberfest feature-request good first issue

Most helpful comment

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

All 16 comments

golint,gofmt was add in #1159

/good-first-issue

@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?

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.

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

/open

@zroubalik please reopen.

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

@zroubalik please reopen ,thanks . 馃ぃ

it was automatically closed again.

I am currently working on enabling gocyclo

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

It seems there is already a PR for goconst https://github.com/kedacore/keda/pull/1296

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

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

I am currently working on enabling gocritic

Hi, I'm working on enabling errcheck

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cwhfa picture cwhfa  路  4Comments

genadyk picture genadyk  路  3Comments

alexakr picture alexakr  路  4Comments

jeffhollan picture jeffhollan  路  3Comments

turbaszek picture turbaszek  路  4Comments