Instead of using //nolint:ireturn the linter allows the use of generic return types through the global config (on top of the listed defaults which now have been explicitly set).
This approach also eliminates a recurring issue where nolintlint reports the directive above as not used by the defined linter.
On top of that, we have --fix flag enabled for golangci-lint runner. This results in the removal of these comments as nolintlint tries to auto fix.
As a consequence the subsequent run of make lint yields errors for previously disabled linters and the cycle continues :)
[!IMPORTANT]
This behaviour has also been observed for other linters.
As part of this work, the declarations of kustomize plugin constructor funcs has been reworked to return struct pointers instead. The reason for this is that in our feature branch, we rely on kustomize plugins and want to iterate over a slice of resmap.Transfomers but these functions cannot be used in the current form because structs returned have pointer receivers. From the current functionality standpoint (on the incubation branch) this change is harmless.
Needs approval from an approver in each of these files:
- ~~[OWNERS](https://github.com/opendatahub-io/opendatahub-operator/blob/incubation/OWNERS)~~ [ykaliuta,zdtsw]
Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
Description
Instead of using
//nolint:ireturn
the linter allows the use ofgeneric
return types through the global config (on top of the listed defaults which now have been explicitly set).This approach also eliminates a recurring issue where
nolintlint
reports the directive above as not used by the defined linter.Related issue: https://github.com/golangci/golangci-lint/issues/3228
On top of that, we have
--fix
flag enabled forgolangci-lint
runner. This results in the removal of these comments asnolintlint
tries to auto fix.As a consequence the subsequent run of
make lint
yields errors for previously disabled linters and the cycle continues :)As part of this work, the declarations of kustomize plugin constructor funcs has been reworked to return struct pointers instead. The reason for this is that in our feature branch, we rely on kustomize plugins and want to iterate over a slice of
resmap.Transfomers
but these functions cannot be used in the current form because structs returned have pointer receivers. From the current functionality standpoint (on the incubation branch) this change is harmless.How Has This Been Tested?
make
Screenshot or short clip
Merge criteria