Skip to content

Commit

Permalink
feat: Log start and end of checks work to console
Browse files Browse the repository at this point in the history
Independent of the logs being output to console or a file, the information on which checks are running is still relevant. Now, we always log this info to the console.

Signed-off-by: Gabriela Gutierrez <gabigutierrez@google.com>
  • Loading branch information
gabibguti committed Sep 14, 2023
1 parent 6e86a75 commit c4a00a5
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,8 @@ func rootCmd(o *options.Options) error {
output = outputF
}

if o.Format == options.FormatDefault {
for checkName := range enabledChecks {
fmt.Fprintf(os.Stderr, "Starting [%s]\n", checkName)
}
for checkName := range enabledChecks {
fmt.Fprintf(os.Stdout, "Starting [%s]\n", checkName)
}

repoResult, err := pkg.RunScorecard(
Expand All @@ -159,10 +157,8 @@ func rootCmd(o *options.Options) error {
return repoResult.Checks[i].Name < repoResult.Checks[j].Name
})

if o.Format == options.FormatDefault {
for checkName := range enabledChecks {
fmt.Fprintf(os.Stderr, "Finished [%s]\n", checkName)
}
for checkName := range enabledChecks {
fmt.Fprintf(os.Stdout, "Finished [%s]\n", checkName)
}

resultsErr := pkg.FormatResults(
Expand Down

0 comments on commit c4a00a5

Please sign in to comment.