Skip to content
GitHub Actions / golangci failed Feb 24, 2025 in 1s

reviewdog [golangci] report

reported by reviewdog 🐶

Findings (12)

pkg/config/utils.go|804| file-length-limit: file length is 671 lines, which exceeds the limit of 500 (revive)
pkg/config/imports.go|172 col 15| do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf("import_path required to process imports")" (err113)
pkg/config/imports.go|291 col 15| do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf("no valid absolute paths found")" (err113)
pkg/config/imports.go|381 col 15| do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf("no files matching patterns found")" (err113)
pkg/config/load.go|232 col 10| do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf("atmos config directory not found path %s", dirPath)" (err113)
pkg/config/load.go|291 col 10| do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf("failed to parse YAML: %v", err)" (err113)
pkg/config/load.go|344 col 4| singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
pkg/config/import_test.go|115 col 3| ifElseChain: rewrite if-else to switch statement (gocritic)
pkg/config/imports.go|34 col 1| Comment should end in a period (godot)
pkg/config/imports.go|368 col 1| Comment should end in a period (godot)
pkg/config/import_test.go|20 col 1| Comment should end in a period (godot)
pkg/config/imports.go|47 col 1| if len(source.Import) > 0 has complex nested blocks (complexity: 4) (nestif)

Filtered Findings (0)

Annotations

Check failure on line 804 in pkg/config/utils.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/config/utils.go#L804

file-length-limit: file length is 671 lines, which exceeds the limit of 500 (revive)
Raw output
pkg/config/utils.go:804: file-length-limit: file length is 671 lines, which exceeds the limit of 500 (revive)

Check failure on line 172 in pkg/config/imports.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/config/imports.go#L172

do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"import_path required to process imports\")" (err113)
Raw output
pkg/config/imports.go:172:15: do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"import_path required to process imports\")" (err113)
		return nil, fmt.Errorf("import_path required to process imports")
		            ^

Check failure on line 291 in pkg/config/imports.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/config/imports.go#L291

do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"no valid absolute paths found\")" (err113)
Raw output
pkg/config/imports.go:291:15: do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"no valid absolute paths found\")" (err113)
		return nil, fmt.Errorf("no valid absolute paths found")
		            ^

Check failure on line 381 in pkg/config/imports.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/config/imports.go#L381

do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"no files matching patterns found\")" (err113)
Raw output
pkg/config/imports.go:381:15: do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"no files matching patterns found\")" (err113)
		return nil, fmt.Errorf("no files matching patterns found")
		            ^

Check failure on line 232 in pkg/config/load.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/config/load.go#L232

do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"atmos config directory not found path %s\", dirPath)" (err113)
Raw output
pkg/config/load.go:232:10: do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"atmos config directory not found path %s\", dirPath)" (err113)
		return fmt.Errorf("atmos config directory not found path %s", dirPath)
		       ^

Check failure on line 291 in pkg/config/load.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/config/load.go#L291

do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"failed to parse YAML: %v\", err)" (err113)
Raw output
pkg/config/load.go:291:10: do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"failed to parse YAML: %v\", err)" (err113)
		return fmt.Errorf("failed to parse YAML: %v", err)
		       ^

Check failure on line 344 in pkg/config/load.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/config/load.go#L344

singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
Raw output
pkg/config/load.go:344:4: singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
			switch directive {
			^

Check failure on line 115 in pkg/config/import_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/config/import_test.go#L115

ifElseChain: rewrite if-else to switch statement (gocritic)
Raw output
pkg/config/import_test.go:115:3: ifElseChain: rewrite if-else to switch statement (gocritic)
		if r.URL.Path == "/config.yaml" {
		^

Check failure on line 34 in pkg/config/imports.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/config/imports.go#L34

Comment should end in a period (godot)
Raw output
pkg/config/imports.go:34:1: Comment should end in a period (godot)
// import Resolved Paths
^

Check failure on line 368 in pkg/config/imports.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/config/imports.go#L368

Comment should end in a period (godot)
Raw output
pkg/config/imports.go:368:1: Comment should end in a period (godot)
// Helper function to find files matching the patterns
^

Check failure on line 20 in pkg/config/import_test.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/config/import_test.go#L20

Comment should end in a period (godot)
Raw output
pkg/config/import_test.go:20:1: Comment should end in a period (godot)
// Test for processImports
^

Check failure on line 47 in pkg/config/imports.go

See this annotation in the file changed.

@github-actions github-actions / golangci

[golangci] pkg/config/imports.go#L47

`if len(source.Import) > 0` has complex nested blocks (complexity: 4) (nestif)
Raw output
pkg/config/imports.go:47:1: `if len(source.Import) > 0` has complex nested blocks (complexity: 4) (nestif)
	if len(source.Import) > 0 {
^