Skip to content

ci: add lint pipeline using golangci lint #2

ci: add lint pipeline using golangci lint

ci: add lint pipeline using golangci lint #2

Triggered via pull request January 16, 2024 16:19
Status Failure
Total duration 51s
Artifacts

lint.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 10 warnings
lint: test/integration/cryptsetup_test.go#L34
Error return value is not checked (errcheck)
lint: test/integration/cryptsetup_test.go#L46
Error return value is not checked (errcheck)
lint: test/integration/integration_test.go#L16
Error return value is not checked (errcheck)
lint: test/integration/volumes_test.go#L145
Error return value of `mountService.Unpublish` is not checked (errcheck)
lint: test/integration/volumes_test.go#L250
Error return value of `mountService.Unpublish` is not checked (errcheck)
lint: test/integration/integration_test.go#L31
exitAfterDefer: os.Exit will exit, and `defer os.Unsetenv("CGO_ENABLED")` will not run (gocritic)
lint: test/integration/volumes_test.go#L140
elseif: can replace 'else {if cond {}}' with 'else if cond {}' (gocritic)
lint: driver/controller.go#L78
singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
lint: driver/controller.go#L371
singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
lint: driver/controller.go#L380
singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
lint: test/integration/integration_test.go#L79
indent-error-flow: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (revive)
lint: test/integration/integration_test.go#L48
error-strings: error strings should not be capitalized or end with punctuation or a newline (revive)
lint: test/integration/docker.go#L51
error-strings: error strings should not be capitalized or end with punctuation or a newline (revive)
lint: driver/sanity_test.go#L92
unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
lint: driver/sanity_test.go#L104
unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
lint: driver/sanity_test.go#L127
unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
lint: driver/sanity_test.go#L195
unused-parameter: parameter 'targetPath' seems to be unused, consider removing or renaming it as _ (revive)
lint: driver/sanity_test.go#L199
unused-parameter: parameter 'targetPath' seems to be unused, consider removing or renaming it as _ (revive)
lint: driver/sanity_test.go#L210
unused-parameter: parameter 'disk' seems to be unused, consider removing or renaming it as _ (revive)
lint: driver/sanity_test.go#L214
unused-parameter: parameter 'disk' seems to be unused, consider removing or renaming it as _ (revive)