Skip to content

ci: add lint pipeline using golangci lint #6

ci: add lint pipeline using golangci lint

ci: add lint pipeline using golangci lint #6

Triggered via pull request January 17, 2024 12:34
Status Failure
Total duration 37s
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#L35
Error return value is not checked (errcheck)
lint: test/integration/cryptsetup_test.go#L47
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#L146
Error return value of `mountService.Unpublish` is not checked (errcheck)
lint: test/integration/volumes_test.go#L251
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#L141
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#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: 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: 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/node.go#L51
unused-parameter: parameter 'req' seems to be unused, consider removing or renaming it as _ (revive)
lint: driver/node.go#L56
unused-parameter: parameter 'req' 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)