Skip to content

Upgrade golang-lint to v2.0.2

What does this MR do and why?

As it's suggested in gitlab#533459 (closed), this MR is going to try golang-lint v2.0.2, https://golangci-lint.run/product/changelog/

Update the version.

I changed the version to v2.0.2, and got the following error,

Error: can't load config: can't unmarshal config by viper (flags, file): 1 error(s) decoding:
* 'output.formats' expected a map, got 'slice'
Failed executing command with error: can't load config: can't unmarshal config by viper (flags, file): 1 error(s) decoding:
* 'output.formats' expected a map, got 'slice'

Update the config

It seems to be this issue https://github.com/golangci/golangci-lint/issues/5605. So, I did golangci-lint migrate --skip-validation.

Note: the some of the lint rules are disabled to silence errors.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Changzheng Liu

Merge request reports

Loading