Skip to content

Conversation

smaillet
Copy link
Member

@smaillet smaillet commented Sep 3, 2025

Updated to support better error reporting

  • Updates samples to use distinct namespace and correct descriptions
  • Updated Kaleidoscope parser return type to IAstNode? to match interface and intent.
  • Changed constructor to AppControlledDefaultsRootCommand to make the settings a non-nullable type.
    • It makes no sense to use that type unless the settings are provided. The whole point is to make it explicit. So if the default behavior is intended then use the parent type OR explicitly provide a default constructed settings.
  • Changed name of IRootCommand to ICommandLineOptions to better reflect intent and further isolate from System.CommandLine parsing.
  • Updated the ArgsParsing.TryParse<> so that it uses the new ShowHelpOnErrors and ShowTypoCorrections
  • Fixed ReportingTextWriter adapter so it correctly handles new lines and blank lines
  • Added nullability checks to ParseErrorReporterExtensions.CheckAndReportParseErrors
  • Added ParserExtensions to provide extension that allows parsing from a file (as opposed to parsing a string as input)
  • Added override of default color mapping for ColoredConsoleReporter updated the default colors
  • Corrected bug in reporting string messages for ConsoleReporter
  • Disabled RUDE OPT-OUT breaking change that forces appending BuildMeta that is NOT desired

* Updates samples to use distinct namespace and correct descriptions
* Updated Kaleidoscope parser return type to `IAstNode?` to match interface and intent.
* Changed constructor to `AppControlledDefaultsRootCommand` to make the settings a non-nullable type.
    * It makes no sense to use that type unless the settings are provided. The whole point is to make it explicit. So if the default behavior is intended then use the parent type OR explicitly provide a default constructed settings.
* Changed name of  `IRootCommand` to `ICommandLineOptions` to better reflect intent and further isolate from `System.CommandLine` parsing.
* Updated the `ArgsParsing.TryParse<>` so that it uses the new `ShowHelpOnErrors` and `ShowTypoCorrections`
* Fixed `ReportingTextWriter` adapter so it correctly handles new lines and blank lines
* Added nullability checks to `ParseErrorReporterExtensions.CheckAndReportParseErrors`
* Added `ParserExtensions` to provide extension that allows parsing from a file (as opposed to parsing a string as input)
* Added override of default color mapping for `ColoredConsoleReporter` updated the default colors
* Corrected bug in reporting string messages for `ConsoleReporter`
* Disabled RUDE OPT-OUT breaking change that forces appending BuildMeta that is NOT desired
Copy link

github-actions bot commented Sep 3, 2025

Test Results

281 tests  ±0   173 ✅ ±0   13s ⏱️ +2s
  6 suites ±0   108 💤 ±0 
  6 files   ±0     0 ❌ ±0 

Results for commit 1c61f9b. ± Comparison against base commit 51669bd.

@smaillet smaillet merged commit 0e09cac into UbiquityDotNET:develop Sep 3, 2025
4 checks passed
@smaillet smaillet deleted the UpdateErrorReporting branch September 3, 2025 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant