Skip to content

Commit 49f3e7d

Browse files
Update AnalyseCommandSettings to require a path for config generation
- Changed the `GenerateConfig` option to be required and updated the description to clarify the expected input format. - Enhanced the command-line interface for better usability and consistency in configuration generation.
1 parent 4172e31 commit 49f3e7d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

CognitiveCodeAnalysisConsoleApp/src/Commands/AnalyseCommandSettings.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ internal sealed class AnalyseCommandSettings : CommandSettings
1818
[CommandOption("-c|--config")]
1919
public string? ConfigFile { get; init; }
2020

21-
[Description("Write a default cognitive-metrics-settings.json to [path] or the current directory, then exit")]
22-
[CommandOption("--generate-config [path]")]
23-
public FlagValue<string?> GenerateConfig { get; init; }
21+
[Description("Write a default cognitive-metrics-settings.json to PATH or the current directory, then exit")]
22+
[CommandOption("--generate-config [PATH]")]
23+
public required FlagValue<string?> GenerateConfig { get; init; }
2424

2525
[Description("Report type: ConsoleText, Html, Markdown, Json, Sarif, GithubActions, GitlabCodeQuality, Csv. Defaults to console.")]
2626
[CommandOption("-f|-r|--report-type|--report-format")]

0 commit comments

Comments
 (0)