File tree Expand file tree Collapse file tree
StyleCop.Analyzers.Status.Generator Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,12 +19,19 @@ internal class Program
1919 /// The starting point of this application.
2020 /// </summary>
2121 /// <param name="args">The command line parameters.</param>
22- internal static void Main ( string [ ] args )
22+ /// <returns>Zero if the tool completes successfully; otherwise, a non-zero error code.</returns>
23+ internal static int Main ( string [ ] args )
2324 {
2425 if ( args . Length < 1 )
2526 {
2627 Console . WriteLine ( "Path to sln file required." ) ;
27- return ;
28+ return 1 ;
29+ }
30+
31+ if ( ! File . Exists ( args [ 0 ] ) )
32+ {
33+ Console . WriteLine ( $ "Could not find solution file: { Path . GetFullPath ( args [ 0 ] ) } ") ;
34+ return 1 ;
2835 }
2936
3037 MSBuildLocator . RegisterDefaults ( ) ;
@@ -55,8 +62,10 @@ internal static void Main(string[] args)
5562 }
5663 } ;
5764
58- Console . WriteLine ( JsonConvert . SerializeObject ( output ) ) ;
65+ Console . WriteLine ( JsonConvert . SerializeObject ( output , Formatting . Indented ) ) ;
5966 }
67+
68+ return 0 ;
6069 }
6170 }
6271}
You can’t perform that action at this time.
0 commit comments