Skip to content

fix(secrets): inject after substitution #4224

fix(secrets): inject after substitution

fix(secrets): inject after substitution #4224

GitHub Actions / golangci failed Mar 7, 2024 in 1s

reviewdog [golangci] report

reported by reviewdog 🐶

Findings (42)

runtime/kubernetes/mock.go|143 col 53| Error return value of (k8s.io/client-go/tools/cache.SharedInformer).AddEventHandler is not checked (errcheck)
runtime/kubernetes/pod_tracker.go|227 col 40| Error return value of (k8s.io/client-go/tools/cache.SharedInformer).AddEventHandler is not checked (errcheck)
mock/docker/system.go|23 col 35| unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
mock/docker/system.go|32 col 32| unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
mock/docker/config.go|21 col 38| unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
internal/build/snapshot_test.go|105 col 25| unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
internal/build/upload_test.go|135 col 25| unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
internal/step/snapshot_test.go|139 col 25| unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
executor/local/build_test.go|458 col 19| unused-parameter: parameter 'c' seems to be unused, consider removing or renaming it as _ (revive)
executor/local/build_test.go|503 col 19| unused-parameter: parameter 'c' seems to be unused, consider removing or renaming it as _ (revive)
executor/linux/build_test.go|1959 col 19| unused-parameter: parameter 'c' seems to be unused, consider removing or renaming it as _ (revive)
executor/linux/secret.go|202 col 37| non-wrapping format verb for fmt.Errorf. Use %w to format errors (errorlint)
executor/linux/secret.go|219 col 37| non-wrapping format verb for fmt.Errorf. Use %w to format errors (errorlint)
executor/linux/secret.go|236 col 37| non-wrapping format verb for fmt.Errorf. Use %w to format errors (errorlint)
cmd/vela-worker/operate.go|204 col 7| if statements should only be cuddled with assignments (wsl)
cmd/vela-worker/operate.go|121 col 6| assignments should only be cuddled with other assignments (wsl)
cmd/vela-worker/operate.go|128 col 7| branch statements should not be cuddled if block has more than two lines (wsl)
cmd/vela-worker/operate.go|182 col 6| return statements should not be cuddled if block has more than two lines (wsl)
cmd/vela-worker/operate.go|200 col 7| only one cuddle assignment allowed before if statement (wsl)
cmd/vela-worker/operate.go|122 col 6| only one cuddle assignment allowed before if statement (wsl)
cmd/vela-worker/operate.go|169 col 6| branch statements should not be cuddled if block has more than two lines (wsl)
cmd/vela-worker/operate.go|175 col 6| branch statements should not be cuddled if block has more than two lines (wsl)
cmd/vela-worker/operate.go|210 col 7| return statements should not be cuddled if block has more than two lines (wsl)
cmd/vela-worker/start.go|61 col 4| return statements should not be cuddled if block has more than two lines (wsl)
cmd/vela-worker/start.go|70 col 3| expressions should not be cuddled with declarations or returns (wsl)
cmd/vela-worker/start.go|71 col 3| if statements should only be cuddled with assignments (wsl)
cmd/vela-worker/start.go|50 col 4| assignments should only be cuddled with other assignments (wsl)
cmd/vela-worker/start.go|51 col 4| only one cuddle assignment allowed before if statement (wsl)
cmd/vela-worker/start.go|54 col 4| expressions should not be cuddled with blocks (wsl)
cmd/vela-worker/start.go|57 col 4| assignments should only be cuddled with other assignments (wsl)
executor/linux/build_test.go|2697 col 4| ranges should only be cuddled with assignments used in the iteration (wsl)
executor/linux/build_test.go|1233 col 6| if statements should only be cuddled with assignments used in the if statement itself (wsl)
executor/linux/build_test.go|1238 col 4| if statements should only be cuddled with assignments (wsl)
executor/linux/build_test.go|1452 col 4| defer statements should only be cuddled with expressions on same variable (wsl)
executor/linux/build_test.go|1693 col 4| defer statements should only be cuddled with expressions on same variable (wsl)
executor/linux/build_test.go|2623 col 4| defer statements should only be cuddled with expressions on same variable (wsl)
executor/linux/build_test.go|1228 col 4| ranges should only be cuddled with assignments used in the iteration (wsl)
executor/linux/build_test.go|1547 col 6| if statements should only be cuddled with assignments used in the if statement itself (wsl)
executor/linux/build_test.go|2458 col 4| ranges should only be cuddled with assignments used in the iteration (wsl)
executor/linux/build_test.go|2463 col 6| if statements should only be cuddled with assignments used in the if statement itself (wsl)
executor/linux/build_test.go|1801 col 6| only one cuddle assignment allowed before range statement (wsl)
runtime/kubernetes/pod_tracker_test.go|374 col 4| expressions should not be cuddled with blocks (wsl)

Filtered Findings (0)

Annotations

Check failure on line 143 in runtime/kubernetes/mock.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] runtime/kubernetes/mock.go#L143

Error return value of `(k8s.io/client-go/tools/cache.SharedInformer).AddEventHandler` is not checked (errcheck)
Raw output
runtime/kubernetes/mock.go:143:53: Error return value of `(k8s.io/client-go/tools/cache.SharedInformer).AddEventHandler` is not checked (errcheck)
	c.PodTracker.podInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
	                                                   ^

Check failure on line 227 in runtime/kubernetes/pod_tracker.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] runtime/kubernetes/pod_tracker.go#L227

Error return value of `(k8s.io/client-go/tools/cache.SharedInformer).AddEventHandler` is not checked (errcheck)
Raw output
runtime/kubernetes/pod_tracker.go:227:40: Error return value of `(k8s.io/client-go/tools/cache.SharedInformer).AddEventHandler` is not checked (errcheck)
	podInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
	                                      ^

Check failure on line 23 in mock/docker/system.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] mock/docker/system.go#L23

unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
Raw output
mock/docker/system.go:23:35: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
func (s *SystemService) DiskUsage(ctx context.Context, opts types.DiskUsageOptions) (types.DiskUsage, error) {
                                  ^

Check failure on line 32 in mock/docker/system.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] mock/docker/system.go#L32

unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
Raw output
mock/docker/system.go:32:32: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
func (s *SystemService) Events(ctx context.Context, options types.EventsOptions) (<-chan events.Message, <-chan error) {
                               ^

Check failure on line 21 in mock/docker/config.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] mock/docker/config.go#L21

unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
Raw output
mock/docker/config.go:21:38: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
func (c *ConfigService) ConfigCreate(ctx context.Context, config swarm.ConfigSpec) (types.ConfigCreateResponse, error) {
                                     ^

Check failure on line 105 in internal/build/snapshot_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] internal/build/snapshot_test.go#L105

unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
Raw output
internal/build/snapshot_test.go:105:25: unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
		t.Run(test.name, func(t *testing.T) {
		                      ^

Check failure on line 135 in internal/build/upload_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] internal/build/upload_test.go#L135

unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
Raw output
internal/build/upload_test.go:135:25: unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
		t.Run(test.name, func(t *testing.T) {
		                      ^

Check failure on line 139 in internal/step/snapshot_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] internal/step/snapshot_test.go#L139

unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
Raw output
internal/step/snapshot_test.go:139:25: unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
		t.Run(test.name, func(t *testing.T) {
		                      ^

Check failure on line 458 in executor/local/build_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] executor/local/build_test.go#L458

unused-parameter: parameter 'c' seems to be unused, consider removing or renaming it as _ (revive)
Raw output
executor/local/build_test.go:458:19: unused-parameter: parameter 'c' seems to be unused, consider removing or renaming it as _ (revive)
			planFunc: func(c *client) planFuncType {
			               ^

Check failure on line 503 in executor/local/build_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] executor/local/build_test.go#L503

unused-parameter: parameter 'c' seems to be unused, consider removing or renaming it as _ (revive)
Raw output
executor/local/build_test.go:503:19: unused-parameter: parameter 'c' seems to be unused, consider removing or renaming it as _ (revive)
			planFunc: func(c *client) planFuncType {
			               ^

Check failure on line 1959 in executor/linux/build_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] executor/linux/build_test.go#L1959

unused-parameter: parameter 'c' seems to be unused, consider removing or renaming it as _ (revive)
Raw output
executor/linux/build_test.go:1959:19: unused-parameter: parameter 'c' seems to be unused, consider removing or renaming it as _ (revive)
			planFunc: func(c *client) planFuncType {
			               ^

Check failure on line 202 in executor/linux/secret.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] executor/linux/secret.go#L202

non-wrapping format verb for fmt.Errorf. Use `%w` to format errors (errorlint)
Raw output
executor/linux/secret.go:202:37: non-wrapping format verb for fmt.Errorf. Use `%w` to format errors (errorlint)
			return nil, fmt.Errorf("%s: %w", ErrUnableToRetrieve, err)
			                                 ^

Check failure on line 219 in executor/linux/secret.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] executor/linux/secret.go#L219

non-wrapping format verb for fmt.Errorf. Use `%w` to format errors (errorlint)
Raw output
executor/linux/secret.go:219:37: non-wrapping format verb for fmt.Errorf. Use `%w` to format errors (errorlint)
			return nil, fmt.Errorf("%s: %w", ErrUnableToRetrieve, err)
			                                 ^

Check failure on line 236 in executor/linux/secret.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] executor/linux/secret.go#L236

non-wrapping format verb for fmt.Errorf. Use `%w` to format errors (errorlint)
Raw output
executor/linux/secret.go:236:37: non-wrapping format verb for fmt.Errorf. Use `%w` to format errors (errorlint)
			return nil, fmt.Errorf("%s: %w", ErrUnableToRetrieve, err)
			                                 ^

Check failure on line 204 in cmd/vela-worker/operate.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] cmd/vela-worker/operate.go#L204

if statements should only be cuddled with assignments (wsl)
Raw output
cmd/vela-worker/operate.go:204:7: if statements should only be cuddled with assignments (wsl)
						if logErr != nil {
						^

Check failure on line 121 in cmd/vela-worker/operate.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] cmd/vela-worker/operate.go#L121

assignments should only be cuddled with other assignments (wsl)
Raw output
cmd/vela-worker/operate.go:121:6: assignments should only be cuddled with other assignments (wsl)
					w.QueueCheckedIn, err = w.queueCheckIn(gctx, registryWorker)
					^

Check failure on line 128 in cmd/vela-worker/operate.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] cmd/vela-worker/operate.go#L128

branch statements should not be cuddled if block has more than two lines (wsl)
Raw output
cmd/vela-worker/operate.go:128:7: branch statements should not be cuddled if block has more than two lines (wsl)
						continue
						^

Check failure on line 182 in cmd/vela-worker/operate.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] cmd/vela-worker/operate.go#L182

return statements should not be cuddled if block has more than two lines (wsl)
Raw output
cmd/vela-worker/operate.go:182:6: return statements should not be cuddled if block has more than two lines (wsl)
					return nil
					^

Check failure on line 200 in cmd/vela-worker/operate.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] cmd/vela-worker/operate.go#L200

only one cuddle assignment allowed before if statement (wsl)
Raw output
cmd/vela-worker/operate.go:200:7: only one cuddle assignment allowed before if statement (wsl)
						if resp == nil {
						^

Check failure on line 122 in cmd/vela-worker/operate.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] cmd/vela-worker/operate.go#L122

only one cuddle assignment allowed before if statement (wsl)
Raw output
cmd/vela-worker/operate.go:122:6: only one cuddle assignment allowed before if statement (wsl)
					if err != nil {
					^

Check failure on line 169 in cmd/vela-worker/operate.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] cmd/vela-worker/operate.go#L169

branch statements should not be cuddled if block has more than two lines (wsl)
Raw output
cmd/vela-worker/operate.go:169:6: branch statements should not be cuddled if block has more than two lines (wsl)
					continue
					^

Check failure on line 175 in cmd/vela-worker/operate.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] cmd/vela-worker/operate.go#L175

branch statements should not be cuddled if block has more than two lines (wsl)
Raw output
cmd/vela-worker/operate.go:175:6: branch statements should not be cuddled if block has more than two lines (wsl)
					continue
					^

Check failure on line 210 in cmd/vela-worker/operate.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] cmd/vela-worker/operate.go#L210

return statements should not be cuddled if block has more than two lines (wsl)
Raw output
cmd/vela-worker/operate.go:210:7: return statements should not be cuddled if block has more than two lines (wsl)
						return err
						^

Check failure on line 61 in cmd/vela-worker/start.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] cmd/vela-worker/start.go#L61

return statements should not be cuddled if block has more than two lines (wsl)
Raw output
cmd/vela-worker/start.go:61:4: return statements should not be cuddled if block has more than two lines (wsl)
			return gctx.Err()
			^

Check failure on line 70 in cmd/vela-worker/start.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] cmd/vela-worker/start.go#L70

expressions should not be cuddled with declarations or returns (wsl)
Raw output
cmd/vela-worker/start.go:70:3: expressions should not be cuddled with declarations or returns (wsl)
		logrus.Info("starting worker server")
		^