You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* lint: Upgrade golangci-lint
Upgrade to -1 minor latest version.
Run or install golangci-lint using Go is no longer the recommended way [1].
Change installation method to recommended one [2].
Following changes were done to have Makefile install golnagci-lint:
- GOLANGCI_LINT_VERSION - var, control version to install.
- GOLANGCI_LINT_BIN - var, control path where the binary is stored.
Defaults to the project binary dir.
The target ensure binary is installed only when not exist.
The config will be migrated to V2 and following linter issues will be
resolved in follow-up commits.
[1] https://golangci-lint.run/docs/welcome/install/local/#:~:text=Warning
[2] https://golangci-lint.run/docs/welcome/install/local/#binaries
Signed-off-by: Or Mergi <ormergi@redhat.com>
* lint: Migrate config to V2
This commit changes is the result for the following command:
$ make install-golangci-lint
$ ./build/_output/bin/golangci-lint migrate
Migration failed with the following errors, requiring manual changes:
- jsonschema: "linters-settings.nolintlint" does not validate with
"/properties/linters-settings/properties/nolintlint/additionalProperties":
additional properties 'allow-leading-space' not allowed
Rm linters-settings.nolintlint.[].allow-leading-space setting.
- jsonschema: "linters-settings.goimports" does not validate with
"/properties/linters-settings/properties/goimports/type":
got null, want object
Rm empty goimports stanza.
- jsonschema: "linters-settings.mnd" does not validate with
"/properties/linters-settings/properties/mnd/additionalProperties":
additional properties 'settings' not allowed
Change mnd spec from 'mnd.settings.mnd.checks' to 'mnd.checks'.
Config no longer support timeout.
Update lint make targets to specify timeout flag.
Signed-off-by: Or Mergi <ormergi@redhat.com>
* tests: Fix linter issues
Signed-off-by: Or Mergi <ormergi@redhat.com>
---------
Signed-off-by: Or Mergi <ormergi@redhat.com>
0 commit comments