Draft: build: update golangci-lint config
What does this MR do?
- Updates golangci-lint and refactor .golangci.yml.
- Remove deprecated options. Ex: run.deadline. See https://github.com/golangci/golangci-lint/pull/822
- Remove golint (deprecated). See https://github.com/golangci/golangci-lint/pull/1965, https://github.com/golang/go/issues/38968, https://github.com/golang/lint/commit/6edffad5e6160f5949cdefc81710b2706fbcd4f6
- Remove varcheck, structcheck, and deadcode (deprecated). See https://github.com/golangci/golangci-lint/issues/1841
- Add gochecknoinits to fix #342
- Add new linters to replace deprecated linters, enforce gitlab go style guidelines and modern go practices
- Linters run in parallel
Note: This is part of an effort to speed up testing/CI.
TODO
-
I added the Changelog
(e.g.Changelog: feature
) trailer to the commits that need to be included in the changelog -
I added unit tests or they are not required -
I added acceptance tests or they are not required -
I added documentation (or it's not required) -
I followed code review guidelines -
I followed Go Style guidelines
Edited by feistel