Update overrides
section behavior in imports and inline
#944
reviewdog [golangci] report
reported by reviewdog 🐶
Findings (27)
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)
pkg/utils/markdown_utils_test.go|77 col 9| G204: Subprocess launched with a potential tainted input or cmd arguments (gosec)
pkg/utils/markdown_utils_test.go|93 col 9| G204: Subprocess launched with a potential tainted input or cmd arguments (gosec)
pkg/utils/markdown_utils.go|80 col 2| deep-exit: calls to os.Exit only in main() or init() functions (revive)
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)
pkg/utils/markdown_utils.go|55 col 12| do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(format, a...)" (err113)
pkg/utils/markdown_utils_test.go|20 col 9| do not define dynamic errors, use wrapped static errors instead: "errors.New("this is a test error")" (err113)
pkg/utils/markdown_utils_test.go|74 col 44| do not define dynamic errors, use wrapped static errors instead: "errors.New("critical failure")" (err113)
pkg/utils/markdown_utils_test.go|90 col 33| do not define dynamic errors, use wrapped static errors instead: "errors.New("invalid command")" (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|107 col 25| hugeParam: atmosConfig is heavy (5760 bytes); consider passing it by pointer (gocritic)
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 77 in pkg/utils/markdown_utils_test.go
github-actions / golangci
[golangci] pkg/utils/markdown_utils_test.go#L77
G204: Subprocess launched with a potential tainted input or cmd arguments (gosec)
Raw output
pkg/utils/markdown_utils_test.go:77:9: G204: Subprocess launched with a potential tainted input or cmd arguments (gosec)
cmd := exec.Command(os.Args[0], "-test.run=TestPrintErrorMarkdownAndExit")
^
Check failure on line 93 in pkg/utils/markdown_utils_test.go
github-actions / golangci
[golangci] pkg/utils/markdown_utils_test.go#L93
G204: Subprocess launched with a potential tainted input or cmd arguments (gosec)
Raw output
pkg/utils/markdown_utils_test.go:93:9: G204: Subprocess launched with a potential tainted input or cmd arguments (gosec)
cmd := exec.Command(os.Args[0], "-test.run=TestPrintErrorMarkdownAndExit")
^
Check failure on line 80 in pkg/utils/markdown_utils.go
github-actions / golangci
[golangci] pkg/utils/markdown_utils.go#L80
deep-exit: calls to os.Exit only in main() or init() functions (revive)
Raw output
pkg/utils/markdown_utils.go:80:2: deep-exit: calls to os.Exit only in main() or init() functions (revive)
os.Exit(1)
^
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 55 in pkg/utils/markdown_utils.go
github-actions / golangci
[golangci] pkg/utils/markdown_utils.go#L55
do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(format, a...)" (err113)
Raw output
pkg/utils/markdown_utils.go:55:12: do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(format, a...)" (err113)
LogError(fmt.Errorf(format, a...))
^
Check failure on line 20 in pkg/utils/markdown_utils_test.go
github-actions / golangci
[golangci] pkg/utils/markdown_utils_test.go#L20
do not define dynamic errors, use wrapped static errors instead: "errors.New(\"this is a test error\")" (err113)
Raw output
pkg/utils/markdown_utils_test.go:20:9: do not define dynamic errors, use wrapped static errors instead: "errors.New(\"this is a test error\")" (err113)
err := errors.New("this is a test error")
^
Check failure on line 74 in pkg/utils/markdown_utils_test.go
github-actions / golangci
[golangci] pkg/utils/markdown_utils_test.go#L74
do not define dynamic errors, use wrapped static errors instead: "errors.New(\"critical failure\")" (err113)
Raw output
pkg/utils/markdown_utils_test.go:74:44: do not define dynamic errors, use wrapped static errors instead: "errors.New(\"critical failure\")" (err113)
PrintErrorMarkdownAndExit("Fatal Error", errors.New("critical failure"), "Check logs.")
^
Check failure on line 90 in pkg/utils/markdown_utils_test.go
github-actions / golangci
[golangci] pkg/utils/markdown_utils_test.go#L90
do not define dynamic errors, use wrapped static errors instead: "errors.New(\"invalid command\")" (err113)
Raw output
pkg/utils/markdown_utils_test.go:90:33: do not define dynamic errors, use wrapped static errors instead: "errors.New(\"invalid command\")" (err113)
PrintInvalidUsageErrorAndExit(errors.New("invalid command"), "Use --help for usage information.")
^
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 107 in pkg/utils/markdown_utils.go
github-actions / golangci
[golangci] pkg/utils/markdown_utils.go#L107
hugeParam: atmosConfig is heavy (5760 bytes); consider passing it by pointer (gocritic)
Raw output
pkg/utils/markdown_utils.go:107:25: hugeParam: atmosConfig is heavy (5760 bytes); consider passing it by pointer (gocritic)
func InitializeMarkdown(atmosConfig schema.AtmosConfiguration) {
^
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 {
^