dotnet / command-line-api

Command line parsing, invocation, and rendering of terminal output.
https://github.com/dotnet/command-line-api/wiki
MIT License
3.35k stars 375 forks source link

Error Reporting Subsystem #2369

Closed JeanJoeris closed 1 month ago

JeanJoeris commented 3 months ago

This PR aims to address https://github.com/dotnet/command-line-api/issues/2346 by expanding the functionality of the error reporting subsystem.

It adds unit testing around a Report method that preserves old reporting logic. After discussions with @KathleenDollard it was decided to make ParseError public, as Powderhouse is moving towards a world where we expect errors might be created by a variety of subsystems through different projects

It also extends the pattern used elsewhere in Powderhouse of renaming old tests to be suffixed with FunctionalTests as preserving old logic is essentially an integration test. However, these functional tests rely on help functionality not yet present so are commented out.

Would love any thoughts or feedback

JeanJoeris commented 3 months ago

@dotnet-policy-service agree