Skip to content

Commit 1980157

Browse files
committed
#400: Allow suppling all parameters .netconfig
1 parent 2fb6a27 commit 1980157

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/Readme.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ For further details take a look at LICENSE.txt.
6363

6464
CHANGELOG
6565

66+
4.8.2.0
67+
68+
* Fix: #400: Allow suppling all parameters .netconfig
69+
6670
4.8.1.0
6771

6872
* Fix: #399: Improved merging of codeelements (maximum coverage quota was not considered)

src/ReportGenerator.Core/Program.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ public class Program
1616
/// </summary>
1717
private static readonly ILogger Logger = LoggerFactory.GetLogger(typeof(Program));
1818

19+
/// <summary>
20+
/// The arguments which will show the help.
21+
/// </summary>
22+
private static readonly string[] HelpArguments = new[] { "-h", "--h", "help", "-help", "/?", "?" };
23+
1924
/// <summary>
2025
/// The main method.
2126
/// </summary>
@@ -39,12 +44,12 @@ public static int Main(string[] args)
3944
var reportConfigurationBuilder = new ReportConfigurationBuilder();
4045
ReportConfiguration configuration = reportConfigurationBuilder.Create(args);
4146

42-
if (args.Length < 2)
47+
if (args.Length == 1 && HelpArguments.Contains(args[0]))
4348
{
4449
var help = new Help(new ReportBuilderFactory(new ReflectionPluginLoader(configuration.Plugins)));
4550
help.ShowHelp();
4651

47-
return 1;
52+
return 0;
4853
}
4954

5055
return new Generator().GenerateReport(configuration) ? 0 : 1;

0 commit comments

Comments
 (0)