reviewdog [golangci] report
reported by reviewdog 🐶
Findings (21)
internal/exec/stack_processor_utils.go|551 col 1| cognitive complexity 729 of func ProcessStackConfig
is high (> 20) (gocognit)
internal/exec/vendor_utils.go|141 col 1| cognitive complexity 41 of func ReadAndProcessVendorConfigFile
is high (> 20) (gocognit)
internal/exec/stack_processor_utils.go|225 col 9| do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf("invalid stack manifest '%s'\n%v%s", relativeFilePath, err, stackManifestTemplatesErrorMessage)" (err113)
internal/exec/stack_processor_utils.go|235 col 8| do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf("invalid stack manifest '%s'\n%v%s", relativeFilePath, err, stackManifestTemplatesErrorMessage)" (err113)
internal/exec/stack_processor_utils.go|292 col 46| do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf("invalid 'overrides' section in the stack manifest '%s'", relativeFilePath)" (err113)
internal/exec/stack_processor_utils.go|299 col 46| do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf("invalid 'terraform' section in the stack manifest '%s'", relativeFilePath)" (err113)
internal/exec/stack_processor_utils.go|304 col 47| do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf("invalid 'terraform.overrides' section in the stack manifest '%s'", relativeFilePath)" (err113)
internal/exec/stack_processor_utils.go|312 col 46| do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf("invalid 'helmfile' section in the stack manifest '%s'", relativeFilePath)" (err113)
internal/exec/stack_processor_utils.go|317 col 47| do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf("invalid 'terraform.overrides' section in the stack manifest '%s'", relativeFilePath)" (err113)
internal/exec/stack_processor_utils.go|348 col 46| do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf("invalid empty import in the manifest '%s'", relativeFilePath)" (err113)
internal/exec/stack_processor_utils.go|540 col 11| do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf("ProcessYAMLConfigFile: Merge: Deep-merge the stack manifest and all the imports: Error: %v", err)" (err113)
internal/exec/vendor_utils.go|136 col 9| do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf("to vendor a component, the '--component' (shorthand '-c') flag needs to be specified.\n"+\n\t"Example: atmos vendor pull -c \n%s", q)" (err113)
internal/exec/workflow.go|128 col 10| do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf("%s", errorMarkdown)" (err113)
internal/exec/stack_processor_utils.go|552 col 2| hugeParam: atmosConfig is heavy (5760 bytes); consider passing it by pointer (gocritic)
internal/exec/vendor_utils.go|142 col 2| hugeParam: atmosConfig is heavy (5760 bytes); consider passing it by pointer (gocritic)
pkg/utils/markdown_utils.go|20 col 1| Comment should end in a period (godot)
pkg/utils/markdown_utils.go|12 col 2| import "github.com/charmbracelet/log" imported as "l" but must be "log" according to config (importas)
internal/exec/stack_processor_utils.go|297 col 1| if ok
has complex nested blocks (complexity: 4) (nestif)
internal/exec/stack_processor_utils.go|310 col 1| if ok
has complex nested blocks (complexity: 4) (nestif)
internal/exec/stack_processor_utils.go|507 col 1| if len(finalTerraformOverrides) > 0 || len(finalHelmfileOverrides) > 0
has complex nested blocks (complexity: 19) (nestif)
internal/exec/stack_processor_utils.go|1926 col 1| if !isDirectory && isYaml
has complex nested blocks (complexity: 7) (nestif)
Filtered Findings (0)
Annotations
Check failure on line 551 in internal/exec/stack_processor_utils.go
github-actions / golangci
[golangci] internal/exec/stack_processor_utils.go#L551
cognitive complexity 729 of func `ProcessStackConfig` is high (> 20) (gocognit)
Raw output
internal/exec/stack_processor_utils.go:551:1: cognitive complexity 729 of func `ProcessStackConfig` is high (> 20) (gocognit)
func ProcessStackConfig(
^
Check failure on line 141 in internal/exec/vendor_utils.go
github-actions / golangci
[golangci] internal/exec/vendor_utils.go#L141
cognitive complexity 41 of func `ReadAndProcessVendorConfigFile` is high (> 20) (gocognit)
Raw output
internal/exec/vendor_utils.go:141:1: cognitive complexity 41 of func `ReadAndProcessVendorConfigFile` is high (> 20) (gocognit)
func ReadAndProcessVendorConfigFile(
^
Check failure on line 225 in internal/exec/stack_processor_utils.go
github-actions / golangci
[golangci] internal/exec/stack_processor_utils.go#L225
do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"invalid stack manifest '%s'\\n%v%s\", relativeFilePath, err, stackManifestTemplatesErrorMessage)" (err113)
Raw output
internal/exec/stack_processor_utils.go:225:9: do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"invalid stack manifest '%s'\\n%v%s\", relativeFilePath, err, stackManifestTemplatesErrorMessage)" (err113)
e := fmt.Errorf("invalid stack manifest '%s'\n%v%s", relativeFilePath, err, stackManifestTemplatesErrorMessage)
^
Check failure on line 235 in internal/exec/stack_processor_utils.go
github-actions / golangci
[golangci] internal/exec/stack_processor_utils.go#L235
do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"invalid stack manifest '%s'\\n%v%s\", relativeFilePath, err, stackManifestTemplatesErrorMessage)" (err113)
Raw output
internal/exec/stack_processor_utils.go:235:8: do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"invalid stack manifest '%s'\\n%v%s\", relativeFilePath, err, stackManifestTemplatesErrorMessage)" (err113)
e := fmt.Errorf("invalid stack manifest '%s'\n%v%s", relativeFilePath, err, stackManifestTemplatesErrorMessage)
^
Check failure on line 292 in internal/exec/stack_processor_utils.go
github-actions / golangci
[golangci] internal/exec/stack_processor_utils.go#L292
do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"invalid 'overrides' section in the stack manifest '%s'\", relativeFilePath)" (err113)
Raw output
internal/exec/stack_processor_utils.go:292:46: do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"invalid 'overrides' section in the stack manifest '%s'\", relativeFilePath)" (err113)
return nil, nil, nil, nil, nil, nil, nil, fmt.Errorf("invalid 'overrides' section in the stack manifest '%s'", relativeFilePath)
^
Check failure on line 299 in internal/exec/stack_processor_utils.go
github-actions / golangci
[golangci] internal/exec/stack_processor_utils.go#L299
do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"invalid 'terraform' section in the stack manifest '%s'\", relativeFilePath)" (err113)
Raw output
internal/exec/stack_processor_utils.go:299:46: do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"invalid 'terraform' section in the stack manifest '%s'\", relativeFilePath)" (err113)
return nil, nil, nil, nil, nil, nil, nil, fmt.Errorf("invalid 'terraform' section in the stack manifest '%s'", relativeFilePath)
^
Check failure on line 304 in internal/exec/stack_processor_utils.go
github-actions / golangci
[golangci] internal/exec/stack_processor_utils.go#L304
do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"invalid 'terraform.overrides' section in the stack manifest '%s'\", relativeFilePath)" (err113)
Raw output
internal/exec/stack_processor_utils.go:304:47: do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"invalid 'terraform.overrides' section in the stack manifest '%s'\", relativeFilePath)" (err113)
return nil, nil, nil, nil, nil, nil, nil, fmt.Errorf("invalid 'terraform.overrides' section in the stack manifest '%s'", relativeFilePath)
^
Check failure on line 312 in internal/exec/stack_processor_utils.go
github-actions / golangci
[golangci] internal/exec/stack_processor_utils.go#L312
do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"invalid 'helmfile' section in the stack manifest '%s'\", relativeFilePath)" (err113)
Raw output
internal/exec/stack_processor_utils.go:312:46: do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"invalid 'helmfile' section in the stack manifest '%s'\", relativeFilePath)" (err113)
return nil, nil, nil, nil, nil, nil, nil, fmt.Errorf("invalid 'helmfile' section in the stack manifest '%s'", relativeFilePath)
^
Check failure on line 317 in internal/exec/stack_processor_utils.go
github-actions / golangci
[golangci] internal/exec/stack_processor_utils.go#L317
do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"invalid 'terraform.overrides' section in the stack manifest '%s'\", relativeFilePath)" (err113)
Raw output
internal/exec/stack_processor_utils.go:317:47: do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"invalid 'terraform.overrides' section in the stack manifest '%s'\", relativeFilePath)" (err113)
return nil, nil, nil, nil, nil, nil, nil, fmt.Errorf("invalid 'terraform.overrides' section in the stack manifest '%s'", relativeFilePath)
^
Check failure on line 348 in internal/exec/stack_processor_utils.go
github-actions / golangci
[golangci] internal/exec/stack_processor_utils.go#L348
do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"invalid empty import in the manifest '%s'\", relativeFilePath)" (err113)
Raw output
internal/exec/stack_processor_utils.go:348:46: do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"invalid empty import in the manifest '%s'\", relativeFilePath)" (err113)
return nil, nil, nil, nil, nil, nil, nil, fmt.Errorf("invalid empty import in the manifest '%s'", relativeFilePath)
^
Check failure on line 540 in internal/exec/stack_processor_utils.go
github-actions / golangci
[golangci] internal/exec/stack_processor_utils.go#L540
do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"ProcessYAMLConfigFile: Merge: Deep-merge the stack manifest and all the imports: Error: %v\", err)" (err113)
Raw output
internal/exec/stack_processor_utils.go:540:11: do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"ProcessYAMLConfigFile: Merge: Deep-merge the stack manifest and all the imports: Error: %v\", err)" (err113)
err2 := fmt.Errorf("ProcessYAMLConfigFile: Merge: Deep-merge the stack manifest and all the imports: Error: %v", err)
^
Check failure on line 136 in internal/exec/vendor_utils.go
github-actions / golangci
[golangci] internal/exec/vendor_utils.go#L136
do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"to vendor a component, the '--component' (shorthand '-c') flag needs to be specified.\\n\"+\n\t\"Example: atmos vendor pull -c <component>\\n%s\", q)" (err113)
Raw output
internal/exec/vendor_utils.go:136:9: do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"to vendor a component, the '--component' (shorthand '-c') flag needs to be specified.\\n\"+\n\t\"Example: atmos vendor pull -c <component>\\n%s\", q)" (err113)
return fmt.Errorf("to vendor a component, the '--component' (shorthand '-c') flag needs to be specified.\n"+
^
Check failure on line 128 in internal/exec/workflow.go
github-actions / golangci
[golangci] internal/exec/workflow.go#L128
do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"%s\", errorMarkdown)" (err113)
Raw output
internal/exec/workflow.go:128:10: do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"%s\", errorMarkdown)" (err113)
return fmt.Errorf("%s", errorMarkdown)
^
Check failure on line 552 in internal/exec/stack_processor_utils.go
github-actions / golangci
[golangci] internal/exec/stack_processor_utils.go#L552
hugeParam: atmosConfig is heavy (5760 bytes); consider passing it by pointer (gocritic)
Raw output
internal/exec/stack_processor_utils.go:552:2: hugeParam: atmosConfig is heavy (5760 bytes); consider passing it by pointer (gocritic)
atmosConfig schema.AtmosConfiguration,
^
Check failure on line 142 in internal/exec/vendor_utils.go
github-actions / golangci
[golangci] internal/exec/vendor_utils.go#L142
hugeParam: atmosConfig is heavy (5760 bytes); consider passing it by pointer (gocritic)
Raw output
internal/exec/vendor_utils.go:142:2: hugeParam: atmosConfig is heavy (5760 bytes); consider passing it by pointer (gocritic)
atmosConfig schema.AtmosConfiguration,
^
Check failure on line 20 in pkg/utils/markdown_utils.go
github-actions / golangci
[golangci] pkg/utils/markdown_utils.go#L20
Comment should end in a period (godot)
Raw output
pkg/utils/markdown_utils.go:20:1: Comment should end in a period (godot)
// render is the global markdown renderer instance initialized via InitializeMarkdown
^
Check failure on line 12 in pkg/utils/markdown_utils.go
github-actions / golangci
[golangci] pkg/utils/markdown_utils.go#L12
import "github.com/charmbracelet/log" imported as "l" but must be "log" according to config (importas)
Raw output
pkg/utils/markdown_utils.go:12:2: import "github.com/charmbracelet/log" imported as "l" but must be "log" according to config (importas)
l "github.com/charmbracelet/log"
^
Check failure on line 297 in internal/exec/stack_processor_utils.go
github-actions / golangci
[golangci] internal/exec/stack_processor_utils.go#L297
`if ok` has complex nested blocks (complexity: 4) (nestif)
Raw output
internal/exec/stack_processor_utils.go:297:1: `if ok` has complex nested blocks (complexity: 4) (nestif)
if o, ok := stackConfigMap[cfg.TerraformSectionName]; ok {
^
Check failure on line 310 in internal/exec/stack_processor_utils.go
github-actions / golangci
[golangci] internal/exec/stack_processor_utils.go#L310
`if ok` has complex nested blocks (complexity: 4) (nestif)
Raw output
internal/exec/stack_processor_utils.go:310:1: `if ok` has complex nested blocks (complexity: 4) (nestif)
if o, ok := stackConfigMap[cfg.HelmfileSectionName]; ok {
^
Check failure on line 507 in internal/exec/stack_processor_utils.go
github-actions / golangci
[golangci] internal/exec/stack_processor_utils.go#L507
`if len(finalTerraformOverrides) > 0 || len(finalHelmfileOverrides) > 0` has complex nested blocks (complexity: 19) (nestif)
Raw output
internal/exec/stack_processor_utils.go:507:1: `if len(finalTerraformOverrides) > 0 || len(finalHelmfileOverrides) > 0` has complex nested blocks (complexity: 19) (nestif)
if len(finalTerraformOverrides) > 0 || len(finalHelmfileOverrides) > 0 {
^
Check failure on line 1926 in internal/exec/stack_processor_utils.go
github-actions / golangci
[golangci] internal/exec/stack_processor_utils.go#L1926
`if !isDirectory && isYaml` has complex nested blocks (complexity: 7) (nestif)
Raw output
internal/exec/stack_processor_utils.go:1926:1: `if !isDirectory && isYaml` has complex nested blocks (complexity: 7) (nestif)
if !isDirectory && isYaml {
^