Fix - output message for non default output (#167)

The json output had non-json output. Fixed it output only for default
output.
This commit is contained in:
Naveen 2021-02-12 21:13:54 -05:00 committed by GitHub
parent cb7ee064b9
commit c77e995ae5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,7 +105,10 @@ var rootCmd = &cobra.Command{
enabledChecks = checks.AllChecks
}
for _, c := range enabledChecks {
fmt.Fprintf(os.Stderr, "Starting [%s]\n", c.Name)
if format == formatDefault {
fmt.Fprintf(os.Stderr, "Starting [%s]\n", c.Name)
}
}
ctx := context.Background()
@ -113,7 +116,9 @@ var rootCmd = &cobra.Command{
// Collect results
results := []pkg.Result{}
for result := range resultsCh {
fmt.Fprintf(os.Stderr, "Finished [%s]\n", result.Name)
if format == formatDefault {
fmt.Fprintf(os.Stderr, "Finished [%s]\n", result.Name)
}
results = append(results, result)
}