Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions cmd/gosec/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,7 @@ func getPrintedFormat(format string, verbose string) string {
}

func printReport(format string, color bool, rootPaths []string, reportInfo *gosec.ReportInfo) error {
err := report.CreateReport(os.Stdout, format, color, rootPaths, reportInfo)
if err != nil {
return err
}
return nil
return report.CreateReport(os.Stdout, format, color, rootPaths, reportInfo)
}

func saveReport(filename, format string, rootPaths []string, reportInfo *gosec.ReportInfo) error {
Expand All @@ -307,11 +303,7 @@ func saveReport(filename, format string, rootPaths []string, reportInfo *gosec.R
return err
}
defer outfile.Close() // #nosec G307
err = report.CreateReport(outfile, format, false, rootPaths, reportInfo)
if err != nil {
return err
}
return nil
return report.CreateReport(outfile, format, false, rootPaths, reportInfo)
}

func convertToScore(value string) (issue.Score, error) {
Expand Down
Loading