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
Results of the Lint codebase using Makefile CI job from #612:
Running linting tools ...
Running go vet ...
Running golangci-lint ...
level=warning msg="[runner] The linter 'maligned' is deprecated (since v1.38.0) due to: The repository of the linter has been archived by the owner. Replaced by govet 'fieldalignment'."
internal/vsphere/attributes.go:269:17: nilness: tautological condition: non-nil != nil (govet)
case caValErr != nil:
^
internal/vsphere/snapshots.go:1076:16: nilness: tautological condition: non-nil != nil (govet)
case parent != nil:
^
internal/vsphere/get.go:277:6: shadow: declaration of "err" shadows declaration at line 260 (govet)
if err := v.Destroy(ctx); err != nil {
^
internal/vsphere/vms.go:2070:3: shadow: declaration of "numCurrentBackups" shadows declaration at line 2063 (govet)
numCurrentBackups := numWithBackups - numWithOldBackups
^
make: *** [Makefile:143: linting] Error 1
Error: Process completed with exit code 2.
The text was updated successfully, but these errors were encountered:
- ignore shadowing warning for `err` variable within if statement
that wraps deferred view destruction
- alternative here is to use a name error return value and
return the view destruction failure result if `err` is not
already set to another value
- library devs don't check the error return value for the
view destruction attempt, which signals to me that the risk
of it failing is very, very low
- fix unintentional shadowing (essentially "NOOP" scenario) from
minor refactoring
- replace explicit case statements with default case to resolve
"tautological" conditions
refs GH-613
Results of the
Lint codebase using Makefile
CI job from #612:The text was updated successfully, but these errors were encountered: