Skip to content

Replace Code Climate with golangci-lint

What does this MR do?

Replace Code Climate with golangci-lint. golangci-lint is set up to produce Code Climate-compatible output.

Why was this MR needed?

golangci-lint is faster, more efficient, and doesn't resort to using a Docker container.

Are there points in the code the reviewer needs to double check?

I've enabled the same linters as were present in Code Climate (gocyclo, gofmt->goimports, govet, golint), and some additional ones (deadcode, goconst, ineffassign, misspell, structcheck, typecheck, unconvert, varcheck) that didn't require significant changes to the codebase, but will protect us in the future.

I'm passing -v to golangci-lint so we have some additional information about execution, memory usage, etc. I know this will be useful in the future for comparison when we decide to add a new linter and start having resource issues.

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Added tests for this feature/bug
  • In case of conflicts with master - branch was rebased

What are the relevant issue numbers?

gitlab-org/gitlab-runner#24911 (closed)

Merge request reports