Skip to content

add error return value to recover

Sign in for the full log view
GitHub Actions / golangci-lint failed Apr 30, 2024 in 1s

reviewdog [golangci-lint] report

reported by reviewdog 🐶

Findings (1)

src/common/gitservice/git_service.go|5| File is not goimports-ed (goimports)

Filtered Findings (27)

src/common/color_check.go|12 col 20| captLocal: NoColorBool' should not be capitalized (gocritic) [src/common/tagging/external/tag_group.go|81 col 4|](https://github.com/bridgecrewio/yor/blob/d3d1064d5c70149619a6ee0b9ca2604898c765f1/src/common/tagging/external/tag_group.go#L81) typeSwitchVar: 1 case can benefit from type switch with assignment (gocritic) [src/common/json/json_writer.go|94 col 3|](https://github.com/bridgecrewio/yor/blob/d3d1064d5c70149619a6ee0b9ca2604898c765f1/src/common/json/json_writer.go#L94) ifElseChain: rewrite if-else to switch statement (gocritic) [src/common/utils/utils_test.go|112 col 3|](https://github.com/bridgecrewio/yor/blob/d3d1064d5c70149619a6ee0b9ca2604898c765f1/src/common/utils/utils_test.go#L112) commentFormatting: put a space between //and comment text (gocritic) [src/terraform/structure/terraform_parser.go|33 col 44|](https://github.com/bridgecrewio/yor/blob/d3d1064d5c70149619a6ee0b9ca2604898c765f1/src/terraform/structure/terraform_parser.go#L33) commentFormatting: put a space between//and comment text (gocritic) [src/terraform/structure/terraform_parser.go|269 col 2|](https://github.com/bridgecrewio/yor/blob/d3d1064d5c70149619a6ee0b9ca2604898c765f1/src/terraform/structure/terraform_parser.go#L269) commentFormatting: put a space between//and comment text (gocritic) [src/common/runner/runner.go|95 col 15|](https://github.com/bridgecrewio/yor/blob/d3d1064d5c70149619a6ee0b9ca2604898c765f1/src/common/runner/runner.go#L95) appendAssign: append result not assigned to the same slice (gocritic) [src/common/color_check.go|4|](https://github.com/bridgecrewio/yor/blob/d3d1064d5c70149619a6ee0b9ca2604898c765f1/src/common/color_check.go#L4) File is notgofmt-ed with -s(gofmt) [src/common/tagging/external/tag_group.go|247|](https://github.com/bridgecrewio/yor/blob/d3d1064d5c70149619a6ee0b9ca2604898c765f1/src/common/tagging/external/tag_group.go#L247) File is notgofmt-ed with -s(gofmt) [tests/utils/utils.go|9|](https://github.com/bridgecrewio/yor/blob/d3d1064d5c70149619a6ee0b9ca2604898c765f1/tests/utils/utils.go#L9) File is notgofmt-ed with -s(gofmt) [src/common/reports/report_service.go|152|](https://github.com/bridgecrewio/yor/blob/d3d1064d5c70149619a6ee0b9ca2604898c765f1/src/common/reports/report_service.go#L152) File is notgofmt-ed with -s(gofmt) [src/common/reports/results_test.go|123|](https://github.com/bridgecrewio/yor/blob/d3d1064d5c70149619a6ee0b9ca2604898c765f1/src/common/reports/results_test.go#L123) File is notgofmt-ed with -s(gofmt) [src/common/color_check.go|34|](https://github.com/bridgecrewio/yor/blob/d3d1064d5c70149619a6ee0b9ca2604898c765f1/src/common/color_check.go#L34) File is notgoimports-ed (goimports) [src/serverless/structure/serverless_parser.go|6|](https://github.com/bridgecrewio/yor/blob/d3d1064d5c70149619a6ee0b9ca2604898c765f1/src/serverless/structure/serverless_parser.go#L6) File is not goimports-ed (goimports) [src/common/tagging/code2cloud/tag_group.go|4|](https://github.com/bridgecrewio/yor/blob/d3d1064d5c70149619a6ee0b9ca2604898c765f1/src/common/tagging/code2cloud/tag_group.go#L4) File is not goimports-ed (goimports) [src/common/tagging/code2cloud/yor_name.go|4|](https://github.com/bridgecrewio/yor/blob/d3d1064d5c70149619a6ee0b9ca2604898c765f1/src/common/tagging/code2cloud/yor_name.go#L4) File is not goimports-ed (goimports) [src/common/runner/runner_test.go|5|](https://github.com/bridgecrewio/yor/blob/d3d1064d5c70149619a6ee0b9ca2604898c765f1/src/common/runner/runner_test.go#L5) File is not goimports-ed (goimports) [src/common/yaml/yaml_writer.go|216 col 41|](https://github.com/bridgecrewio/yor/blob/d3d1064d5c70149619a6ee0b9ca2604898c765f1/src/common/yaml/yaml_writer.go#L216) getYAMLLines-isCfnis unused (unparam) [src/common/yaml/yaml_writer.go|228 col 6|](https://github.com/bridgecrewio/yor/blob/d3d1064d5c70149619a6ee0b9ca2604898c765f1/src/common/yaml/yaml_writer.go#L228) funcremoveLineByAttributeis unused (unused) [src/common/logger/logging_service.go|15 col 2|](https://github.com/bridgecrewio/yor/blob/d3d1064d5c70149619a6ee0b9ca2604898c765f1/src/common/logger/logging_service.go#L15) fieldtempWriteris unused (unused) [src/common/runner/runner.go|41 col 2|](https://github.com/bridgecrewio/yor/blob/d3d1064d5c70149619a6ee0b9ca2604898c765f1/src/common/runner/runner.go#L41) fieldlocalModuleTagis unused (unused) [src/terraform/structure/terraform_parser.go|569 col 3|](https://github.com/bridgecrewio/yor/blob/d3d1064d5c70149619a6ee0b9ca2604898c765f1/src/terraform/structure/terraform_parser.go#L569) S1005: unnecessary assignment to the blank identifier (gosimple) [src/serverless/structure/serverless_parser.go|41 col 2|](https://github.com/bridgecrewio/yor/blob/d3d1064d5c70149619a6ee0b9ca2604898c765f1/src/serverless/structure/serverless_parser.go#L41) S1023: redundantreturn` statement (gosimple)
src/cloudformation/structure/cloudformation_parser.go|198 col 3| ineffectual assignment to ok (ineffassign)
src/common/json/json_writer.go|157 col 5| ineffectual assignment to parentIdentifier (ineffassign)
src/common/runner/runner_test.go|288 col 3| ineffectual assignment to err (ineffassign)
src/common/yaml/yaml_writer.go|299 col 5| ineffectual assignment to readResources (ineffassign)

Annotations

Check failure on line 5 in src/common/gitservice/git_service.go

See this annotation in the file changed.

@github-actions github-actions / golangci-lint

[golangci-lint] src/common/gitservice/git_service.go#L5

File is not `goimports`-ed (goimports)
Raw output
src/common/gitservice/git_service.go:5: File is not `goimports`-ed (goimports)
	"github.com/pkg/errors"