Skip to content

add codecov

add codecov #4207

GitHub Actions / golangci failed Feb 23, 2024 in 1s

reviewdog [golangci] report

reported by reviewdog 🐶

Findings (42)

executor/linux/step.go|72 col 27| unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
executor/linux/service.go|62 col 30| unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
executor/linux/build_test.go|1881 col 22| unused-parameter: parameter 'ctx' 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/build_test.go|1985 col 19| unused-parameter: parameter 'c' seems to be unused, consider removing or renaming it as _ (revive)
executor/linux/build_test.go|2057 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)
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|213 col 6| if statements should only be cuddled with assignments used in the if statement itself (wsl)
executor/linux/build_test.go|1848 col 4| if statements should only be cuddled with assignments (wsl)
executor/linux/build_test.go|2645 col 5| only one cuddle assignment allowed before if statement (wsl)
executor/linux/build_test.go|218 col 4| if statements should only be cuddled with assignments (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|2416 col 5| if statements should only be cuddled with assignments (wsl)
executor/linux/build_test.go|148 col 4| defer statements should only be cuddled with expressions on same variable (wsl)
executor/linux/build_test.go|1843 col 6| if statements should only be cuddled with assignments used in the if statement itself (wsl)
executor/linux/build_test.go|2364 col 5| only one cuddle assignment allowed before if statement (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|1542 col 4| ranges should only be cuddled with assignments used in the iteration (wsl)
executor/linux/build_test.go|1801 col 6| only one cuddle assignment allowed before range statement (wsl)
executor/linux/build_test.go|170 col 5| only one cuddle assignment allowed before if statement (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|1693 col 4| defer statements should only be cuddled with expressions on same variable (wsl)
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)
runtime/kubernetes/pod_tracker_test.go|185 col 25| unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
runtime/kubernetes/pod_tracker_test.go|259 col 25| unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
runtime/kubernetes/pod_tracker_test.go|328 col 25| unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
runtime/kubernetes/pod_tracker_test.go|374 col 4| expressions should not be cuddled with blocks (wsl)
internal/context/context_test.go|148 col 4| assignments should only be cuddled with other 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|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/operate.go|169 col 6| 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/start.go|50 col 4| assignments should only be cuddled with other assignments (wsl)
cmd/vela-worker/start.go|54 col 4| expressions should not be cuddled with blocks (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)

Filtered Findings (0)

Annotations

Check failure on line 72 in executor/linux/step.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] executor/linux/step.go#L72

unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
Raw output
executor/linux/step.go:72:27: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
func (c *client) PlanStep(ctx context.Context, ctn *pipeline.Container) error {
                          ^

Check failure on line 62 in executor/linux/service.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] executor/linux/service.go#L62

unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
Raw output
executor/linux/service.go:62:30: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
func (c *client) PlanService(ctx context.Context, ctn *pipeline.Container) error {
                             ^

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

See this annotation in the file changed.

@github-actions github-actions / golangci

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

unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
Raw output
executor/linux/build_test.go:1881:22: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
	planNothing := func(ctx context.Context, container *pipeline.Container) error {
	                    ^

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 1985 in executor/linux/build_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

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

unused-parameter: parameter 'c' seems to be unused, consider removing or renaming it as _ (revive)
Raw output
executor/linux/build_test.go:1985: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 2057 in executor/linux/build_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

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

unused-parameter: parameter 'c' seems to be unused, consider removing or renaming it as _ (revive)
Raw output
executor/linux/build_test.go:2057: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 2458 in executor/linux/build_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

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

ranges should only be cuddled with assignments used in the iteration (wsl)
Raw output
executor/linux/build_test.go:2458:4: ranges should only be cuddled with assignments used in the iteration (wsl)
			for _, logEntry := range loggerHook.AllEntries() {
			^

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

See this annotation in the file changed.

@github-actions github-actions / golangci

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

if statements should only be cuddled with assignments used in the if statement itself (wsl)
Raw output
executor/linux/build_test.go:213:6: if statements should only be cuddled with assignments used in the if statement itself (wsl)
					if !test.logError {
					^

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

See this annotation in the file changed.

@github-actions github-actions / golangci

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

if statements should only be cuddled with assignments (wsl)
Raw output
executor/linux/build_test.go:1848:4: if statements should only be cuddled with assignments (wsl)
			if test.logError && !loggedError {
			^

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

See this annotation in the file changed.

@github-actions github-actions / golangci

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

only one cuddle assignment allowed before if statement (wsl)
Raw output
executor/linux/build_test.go:2645:5: only one cuddle assignment allowed before if statement (wsl)
				if err != nil {
				^

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

See this annotation in the file changed.

@github-actions github-actions / golangci

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

if statements should only be cuddled with assignments (wsl)
Raw output
executor/linux/build_test.go:218:4: if statements should only be cuddled with assignments (wsl)
			if test.logError && !loggedError {
			^

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

See this annotation in the file changed.

@github-actions github-actions / golangci

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

if statements should only be cuddled with assignments used in the if statement itself (wsl)
Raw output
executor/linux/build_test.go:1233:6: if statements should only be cuddled with assignments used in the if statement itself (wsl)
					if !test.logError {
					^

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

See this annotation in the file changed.

@github-actions github-actions / golangci

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

if statements should only be cuddled with assignments (wsl)
Raw output
executor/linux/build_test.go:2416:5: if statements should only be cuddled with assignments (wsl)
				if test.earlyBuildDone || test.earlyExecExit {
				^

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

See this annotation in the file changed.

@github-actions github-actions / golangci

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

defer statements should only be cuddled with expressions on same variable (wsl)
Raw output
executor/linux/build_test.go:148:4: defer statements should only be cuddled with expressions on same variable (wsl)
			defer loggerHook.Reset()
			^

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

See this annotation in the file changed.

@github-actions github-actions / golangci

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

if statements should only be cuddled with assignments used in the if statement itself (wsl)
Raw output
executor/linux/build_test.go:1843:6: if statements should only be cuddled with assignments used in the if statement itself (wsl)
					if !test.logError {
					^

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

See this annotation in the file changed.

@github-actions github-actions / golangci

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

only one cuddle assignment allowed before if statement (wsl)
Raw output
executor/linux/build_test.go:2364:5: only one cuddle assignment allowed before if statement (wsl)
				if err != nil {
				^

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

See this annotation in the file changed.

@github-actions github-actions / golangci

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

defer statements should only be cuddled with expressions on same variable (wsl)
Raw output
executor/linux/build_test.go:1452:4: defer statements should only be cuddled with expressions on same variable (wsl)
			defer loggerHook.Reset()
			^

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

See this annotation in the file changed.

@github-actions github-actions / golangci

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

ranges should only be cuddled with assignments used in the iteration (wsl)
Raw output
executor/linux/build_test.go:1542:4: ranges should only be cuddled with assignments used in the iteration (wsl)
			for _, logEntry := range loggerHook.AllEntries() {
			^

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

See this annotation in the file changed.

@github-actions github-actions / golangci

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

only one cuddle assignment allowed before range statement (wsl)
Raw output
executor/linux/build_test.go:1801:6: only one cuddle assignment allowed before range statement (wsl)
					for index, stepsCompletedPercent := range percents {
					^

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

See this annotation in the file changed.

@github-actions github-actions / golangci

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

only one cuddle assignment allowed before if statement (wsl)
Raw output
executor/linux/build_test.go:170:5: only one cuddle assignment allowed before if statement (wsl)
				if err != nil {
				^

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

See this annotation in the file changed.

@github-actions github-actions / golangci

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

ranges should only be cuddled with assignments used in the iteration (wsl)
Raw output
executor/linux/build_test.go:2697:4: ranges should only be cuddled with assignments used in the iteration (wsl)
			for _, logEntry := range loggerHook.AllEntries() {
			^

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

See this annotation in the file changed.

@github-actions github-actions / golangci

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

defer statements should only be cuddled with expressions on same variable (wsl)
Raw output
executor/linux/build_test.go:1693:4: defer statements should only be cuddled with expressions on same variable (wsl)
			defer loggerHook.Reset()
			^