Skip to content

Commit

Permalink
#400: Allow suppling all parameters .netconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpalme committed Dec 15, 2020
1 parent 2fb6a27 commit 1980157
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ For further details take a look at LICENSE.txt.

CHANGELOG

4.8.2.0

* Fix: #400: Allow suppling all parameters .netconfig

4.8.1.0

* Fix: #399: Improved merging of codeelements (maximum coverage quota was not considered)
Expand Down
9 changes: 7 additions & 2 deletions src/ReportGenerator.Core/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ public class Program
/// </summary>
private static readonly ILogger Logger = LoggerFactory.GetLogger(typeof(Program));

/// <summary>
/// The arguments which will show the help.
/// </summary>
private static readonly string[] HelpArguments = new[] { "-h", "--h", "help", "-help", "/?", "?" };

/// <summary>
/// The main method.
/// </summary>
Expand All @@ -39,12 +44,12 @@ public static int Main(string[] args)
var reportConfigurationBuilder = new ReportConfigurationBuilder();
ReportConfiguration configuration = reportConfigurationBuilder.Create(args);

if (args.Length < 2)
if (args.Length == 1 && HelpArguments.Contains(args[0]))
{
var help = new Help(new ReportBuilderFactory(new ReflectionPluginLoader(configuration.Plugins)));
help.ShowHelp();

return 1;
return 0;
}

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

0 comments on commit 1980157

Please sign in to comment.