Skip to content

Commit f42a66c

Browse files
authored
Merge branch 'StackAdmin-1.5.0' into migration-guide
2 parents 26feeb0 + 4fdc509 commit f42a66c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tools/StaticAnalysis/Program.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public static void Main(string[] args)
5252
if (args.Any(a => a == "--package-directory" || a == "-p"))
5353
{
5454
int idx = Array.FindIndex(args, a => a == "--package-directory" || a == "-p");
55-
if (idx == args.Length)
55+
if (idx + 1 == args.Length)
5656
{
5757
throw new ArgumentException("No value provided for the --package-directory parameter.");
5858
}
@@ -81,7 +81,7 @@ public static void Main(string[] args)
8181
if (args.Any(a => a == "--reports-directory" || a == "-r"))
8282
{
8383
int idx = Array.FindIndex(args, a => a == "--reports-directory" || a == "-r");
84-
if (idx == args.Length)
84+
if (idx + 1 == args.Length)
8585
{
8686
throw new ArgumentException("No value provided for the --reports-directory parameter.");
8787
}
@@ -98,12 +98,14 @@ public static void Main(string[] args)
9898
if (args.Any(a => a == "--modules-to-analyze" || a == "-m"))
9999
{
100100
int idx = Array.FindIndex(args, a => a == "--modules-to-analyze" || a == "-m");
101-
if (idx == args.Length)
101+
if (idx + 1 == args.Length)
102102
{
103-
throw new ArgumentException("No value provided for the --modules-to-analyze parameter.");
103+
Console.WriteLine("No value provided for the --modules-to-analyze parameter. Filtering over all built modules.");
104+
}
105+
else
106+
{
107+
modulesToAnalyze = args[idx + 1].Split(';').ToList();
104108
}
105-
106-
modulesToAnalyze = args[idx + 1].Split(';').ToList();
107109
}
108110

109111
bool useNetcore = args.Any(a => a == "--use-netcore" || a == "-u");

0 commit comments

Comments
 (0)