@@ -96,7 +96,7 @@ type Pattern struct {
9696func init () {
9797 analyzeCmd .Flags ().StringVarP (& outputFile , "output" , "o" , "" , "output file for the results" )
9898 analyzeCmd .Flags ().StringVarP (& toolToAnalyze , "tool" , "t" , "" , "Which tool to run analysis with" )
99- analyzeCmd .Flags ().StringVar (& outputFormat , "format" , "" , "Output format (use 'sarif' for SARIF format to terminal )" )
99+ analyzeCmd .Flags ().StringVar (& outputFormat , "format" , "" , "Output format (use 'sarif' for SARIF format)" )
100100 analyzeCmd .Flags ().BoolVarP (& autoFix , "fix" , "f" , false , "Apply auto fix to your issues when available" )
101101 analyzeCmd .Flags ().BoolVar (& doNewPr , "new-pr" , false , "Create a new PR on GitHub containing the fixed issues" )
102102 rootCmd .AddCommand (analyzeCmd )
@@ -221,10 +221,12 @@ var analyzeCmd = &cobra.Command{
221221 nodeBinary := nodeRuntime .Info ()["node" ]
222222
223223 log .Printf ("Running %s...\n " , toolToAnalyze )
224+ if outputFormat == "sarif" {
225+ log .Println ("Output will be in SARIF format" )
226+ }
227+
224228 if outputFile != "" {
225229 log .Println ("Output will be available at" , outputFile )
226- } else if outputFormat == "sarif" {
227- log .Println ("Output will be in SARIF format" )
228230 }
229231
230232 tools .RunEslint (workDirectory , eslintInstallationDirectory , nodeBinary , args , autoFix , outputFile , outputFormat )
0 commit comments