Skip to content

Commit

Permalink
cmd/validator/validator.go: Satisfy goreportcard.
Browse files Browse the repository at this point in the history
  • Loading branch information
shiina4119 committed Aug 24, 2024
1 parent dfa4407 commit 7bf8532
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/validator/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ func getFlags() (validatorConfig, error) {
searchPaths = append(searchPaths, flag.Args()...)
}

if *reportTypePtr != "standard" && *reportTypePtr != "json" && *reportTypePtr != "junit" && *reportTypePtr != "sarif" {
acceptedReportTypes := map[string]bool{"standard": true, "json": true, "junit": true, "sarif": true}

if !acceptedReportTypes[*reportTypePtr] {
fmt.Println("Wrong parameter value for reporter, only supports standard, json, junit or sarif")
flag.Usage()
return validatorConfig{}, errors.New("Wrong parameter value for reporter, only supports standard, json, junit or sarif")
Expand Down

0 comments on commit 7bf8532

Please sign in to comment.