use latest System.CommandLine version#1660
Merged
Bertk merged 2 commits intocoverlet-coverage:masterfrom Aug 27, 2025
Merged
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`.
Contributor
There was a problem hiding this comment.
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.
daveMueller
reviewed
Aug 24, 2025
Changed Main method's return type to Task<int> to allow returning an exit code. Replaced Environment.Exit with a return statement for better control over the exit code and improved usability in asynchronous contexts. This avoids the termination of the process.
daveMueller
approved these changes
Aug 26, 2025
This was referenced Mar 9, 2026
Open
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.