Skip to content

Add GolangCI linter and Go unit tests. #1

Add GolangCI linter and Go unit tests.

Add GolangCI linter and Go unit tests. #1

Triggered via push September 21, 2024 17:33
Status Failure
Total duration 1m 27s
Artifacts

testing.yaml

on: push
Fit to window
Zoom out
Zoom in

Annotations

10 errors
run-tests: internal/vault/autounseal.go#L51
superfluous-else: if block ends with a continue statement, so drop this else and outdent its block (revive)
run-tests: cmd/unseal.go#L21
unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
run-tests: cmd/init.go#L21
unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
run-tests: internal/kubernetes/configmap.go#L19
unnecessary conversion (unconvert)
run-tests: internal/kubernetes/config.go#L32
non-wrapping format verb for fmt.Errorf. Use `%w` to format errors (errorlint)
run-tests: internal/kubernetes/config.go#L40
non-wrapping format verb for fmt.Errorf. Use `%w` to format errors (errorlint)
run-tests: internal/kubernetes/config.go#L45
non-wrapping format verb for fmt.Errorf. Use `%w` to format errors (errorlint)
run-tests: internal/kubernetes/config.go#L61
GetClientSet returns interface (k8s.io/client-go/kubernetes.Interface) (ireturn)
run-tests: internal/vault/autounseal.go#L21
host:port in url should be constructed with net.JoinHostPort and not directly with fmt.Sprintf (nosprintfhostport)
run-tests: internal/kubernetes/pod.go#L25
error returned from interface method should be wrapped: sig: func (k8s.io/client-go/kubernetes/typed/core/v1.PodInterface).List(ctx context.Context, opts k8s.io/apimachinery/pkg/apis/meta/v1.ListOptions) (*k8s.io/api/core/v1.PodList, error) (wrapcheck)