-
Notifications
You must be signed in to change notification settings - Fork 390
use latest System.CommandLine version (GA?) #1660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
4337962
to
2888750
Compare
9a4226e
to
df2b821
Compare
ffd70ea
to
23f6a4d
Compare
- Upgraded `System.CommandLine` package version. - Clarified documentation in `GlobalTool.md` regarding options and exit codes. - Modified Azure Pipelines YAML for package restoration and authentication. - Removed `PackageIconUrl` from `coverlet.collector.csproj`. - Updated `CommandExitCodes` enum in `ExitCodes.cs`. - Refactored `Program.cs` to utilize the new `System.CommandLine` API. - Changed command exit code handling to use a static variable. - Added new package references in `coverlet.console.csproj` and `coverlet.core.csproj`. - Revised integration tests for expected output and error handling. - Adjusted coverage output assertions in tests. - Improved directory handling and file deletion logic in `DeterministicBuild.cs`. - Added reference to `coverlet.console` in `coverlet.integration.tests.csproj`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the coverlet console application to use the latest version of System.CommandLine (2.0.0-beta6) and makes necessary code changes to support the API changes in the newer version.
- Updates System.CommandLine package from 2.0.0-beta4 to 2.0.0-beta6
- Refactors console application argument parsing to use new CommandLine API patterns
- Updates test assertions and adds integration test coverage for console commands
- Fixes various project configurations and package versions
Reviewed Changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
src/coverlet.console/Program.cs |
Major refactoring to use new System.CommandLine API patterns, switching from synchronous to async main method |
test/coverlet.integration.tests/DotnetTool.cs |
Enhanced test coverage with exit code validation and improved error handling |
test/coverlet.integration.tests/Msbuild.cs |
Updated test assertions to reflect new expected coverage percentages (50% instead of 100%) |
Directory.Packages.props |
Updated System.CommandLine package version and other dependency versions |
test/coverlet.integration.template/DeepThought.cs |
Added untested method to support threshold testing scenarios |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Update coverlet.console for latest version of System.CommandLine API.
Note
New version 2.0.0-beta5.25306.1 of System.CommandLine nuget package is available since 19th June 2025.