@@ -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,12 +221,14 @@ var analyzeCmd = &cobra.Command{
221221 nodeBinary := nodeRuntime .Info ()["node" ]
222222
223223 log .Printf ("Running %s...\n " , toolToAnalyze )
224- if outputFile != "" {
225- log .Println ("Output will be available at" , outputFile )
226- } else if outputFormat == "sarif" {
224+ if outputFormat == "sarif" {
227225 log .Println ("Output will be in SARIF format" )
228226 }
229227
228+ if outputFile != "" {
229+ log .Println ("Output will be available at" , outputFile , "(in SARIF format)" )
230+ }
231+
230232 tools .RunEslint (workDirectory , eslintInstallationDirectory , nodeBinary , args , autoFix , outputFile , outputFormat )
231233
232234 if doNewPr {
0 commit comments