reviewdog [golangci-lint] report
reported by reviewdog 🐶
Findings (1)
internal/app/zscaler-terraformer/cmd/import.go|91 col 17| Error return value of json.Unmarshal
is not checked (errcheck)
Filtered Findings (29)
internal/app/zscaler-terraformer/cmd/generate.go|96 col 4| ifElseChain: rewrite if-else to switch statement (gocritic)
internal/app/zscaler-terraformer/cmd/generate.go|698 col 3| ifElseChain: rewrite if-else to switch statement (gocritic)
internal/app/zscaler-terraformer/cmd/generate.go|132 col 3| typeSwitchVar: 1 case can benefit from type switch with assignment (gocritic)
internal/app/zscaler-terraformer/cmd/import.go|101 col 4| ifElseChain: rewrite if-else to switch statement (gocritic)
internal/app/zscaler-terraformer/cmd/util.go|325 col 3| ifElseChain: rewrite if-else to switch statement (gocritic)
internal/app/zscaler-terraformer/cmd/util.go|693 col 2| singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
internal/app/zscaler-terraformer/cmd/util.go|695 col 3| singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
internal/app/zscaler-terraformer/cmd/util.go|263 col 19| sloppyLen: len(obj.([]interface{})) >= 0 is always true (gocritic)
internal/app/zscaler-terraformer/cmd/util.go|288 col 19| sloppyLen: len(obj.([]interface{})) >= 0 is always true (gocritic)
internal/app/zscaler-terraformer/cmd/util.go|330 col 55| sloppyLen: len(structData["adminScopeScopeEntities"].([]interface{})) >= 0 is always true (gocritic)
internal/app/zscaler-terraformer/cmd/util.go|351 col 66| sloppyLen: len(structData["adminScopescopeGroupMemberEntities"].([]interface{})) >= 0 is always true (gocritic)
internal/app/zscaler-terraformer/cmd/root.go|13 col 41| var-naming: var ziaApiKey should be ziaAPIKey (revive)
internal/app/zscaler-terraformer/cmd/type.go|88 col 2| var-naming: don't use underscores in Go names; struct field inspection_custom_controls should be inspectionCustomControls (revive)
internal/app/zscaler-terraformer/cmd/util.go|115 col 19| unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
internal/app/zscaler-terraformer/cmd/generate_test.go|211 col 139| var-naming: func parameter ziaApiKey should be ziaAPIKey (revive)
internal/app/zscaler-terraformer/cmd/generate.go|128 col 24| unused-parameter: parameter 'resourceType' seems to be unused, consider removing or renaming it as _ (revive)
internal/app/zscaler-terraformer/cmd/type.go|89 col 2| var-naming: don't use underscores in Go names; struct field inspection_predefined_controls should be inspectionPredefinedControls (revive)
internal/app/zscaler-terraformer/cmd/generate.go|37 col 5| var-naming: don't use underscores in Go names; var resourceType_ should be resourceType (revive)
internal/app/zscaler-terraformer/cmd/type.go|90 col 2| var-naming: don't use underscores in Go names; struct field inspection_profile should be inspectionProfile (revive)
internal/app/zscaler-terraformer/cmd/util.go|569 col 133| unused-parameter: parameter 'parentID' seems to be unused, consider removing or renaming it as _ (revive)
internal/app/zscaler-terraformer/cmd/util.go|692 col 6| var-naming: func mapTfFieldNameToApi should be mapTfFieldNameToAPI (revive)
internal/app/zscaler-terraformer/cmd/type.go|114 col 2| var-naming: don't use underscores in Go names; struct field dlp_engines should be dlpEngines (revive)
internal/app/zscaler-terraformer/cmd/type.go|115 col 2| var-naming: don't use underscores in Go names; struct field dlp_notification_templates should be dlpNotificationTemplates (revive)
internal/app/zscaler-terraformer/cmd/type.go|116 col 2| var-naming: don't use underscores in Go names; struct field dlp_web_rules should be dlpWebRules (revive)
internal/app/zscaler-terraformer/cmd/type.go|117 col 2| var-naming: don't use underscores in Go names; struct field rule_labels should be ruleLabels (revive)
internal/app/zscaler-terraformer/cmd/type.go|118 col 2| var-naming: don't use underscores in Go names; struct field security_policy_settings should be securityPolicySettings (revive)
internal/app/zscaler-terraformer/cmd/type.go|119 col 2| var-naming: don't use underscores in Go names; struct field user_authentication_settings should be userAuthenticationSettings (revive)
internal/app/zscaler-terraformer/cmd/util.go|79 col 60| executeCommandC - result c is never used (unparam)
internal/app/zscaler-terraformer/cmd/util.go|6 col 2| SA1019: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package [io] or package [os], and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)
Annotations
Check failure on line 91 in internal/app/zscaler-terraformer/cmd/import.go
github-actions / golangci-lint
[golangci-lint] internal/app/zscaler-terraformer/cmd/import.go#L91
Error return value of `json.Unmarshal` is not checked (errcheck)
Raw output
internal/app/zscaler-terraformer/cmd/import.go:91:17: Error return value of `json.Unmarshal` is not checked (errcheck)
json.Unmarshal([]byte(err.Error()), apiErr)
^