Skip to content

Commit

Permalink
Corrected golangci-lint issue
Browse files Browse the repository at this point in the history
Signed-off-by: Felipe Avelar <[email protected]>
  • Loading branch information
felipe-avelar committed May 26, 2021
1 parent fc37c39 commit fdb8e2b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions internal/console/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,7 @@ func initScanFlags(scanCmd *cobra.Command) {
outputPathShorthand,
"",
"directory path to store reports")
scanCmd.Flags().StringSliceVar(&reportFormats,
reportFormatsFlag,
[]string{"json"},
scanCmd.Flags().StringSliceVar(&reportFormats, reportFormatsFlag, []string{"json"},
"formats in which the results will be exported (all, json, sarif, html)",
)
scanCmd.Flags().IntVar(&previewLines,
Expand Down Expand Up @@ -623,7 +621,8 @@ func printOutput(outputPath, filename string, body interface{}, formats []string
// gracefulShutdown catches signal interrupt and returns the appropriate exit code
func gracefulShutdown() {
c := make(chan os.Signal)
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
// This line should not be lint, since golangci-lint has an issue about it (https://github.com/golang/go/issues/45043)
signal.Notify(c, os.Interrupt, syscall.SIGTERM) // nolint
showErrors := consoleHelpers.ShowError("errors")
interruptCode := constants.SignalInterruptCode
go func(showErrors bool, interruptCode int) {
Expand Down

0 comments on commit fdb8e2b

Please sign in to comment.