Skip to content

Commit

Permalink
Merge pull request #7 from michaeljon/issue-6
Browse files Browse the repository at this point in the history
issue-6: make "all" the default for modules"
  • Loading branch information
michaeljon authored May 18, 2022
2 parents 9cf6fed + 7722be6 commit d96134e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Modules/ModuleFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static class ModuleFactory

public static IEnumerable<IQcModule> Create(CliOptions settings)
{
if (settings.ModuleNames.First() == "all")
if (settings.ModuleNames.Any() == false || settings.ModuleNames.First() == "all")
{
settings.ModuleNames = moduleMap.Keys;
return moduleMap.Values;
Expand Down
4 changes: 2 additions & 2 deletions Utils/CliOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public class CliOptions
[Option('f', "format", Required = true, HelpText = "Type of input file.")]
public ReaderType Format { get; set; }

[Option('m', "modules", Required = true, Min = 1, HelpText = "Space-separated list of modules to run, or 'all'.")]
public IEnumerable<string> ModuleNames { get; set; } = Array.Empty<string>();
[Option('m', "modules", Required = false, HelpText = "Space-separated list of modules to run, or 'all'.")]
public IEnumerable<string> ModuleNames { get; set; }

public static CliOptions Settings { get; set; } = null!;

Expand Down

0 comments on commit d96134e

Please sign in to comment.