-
Notifications
You must be signed in to change notification settings - Fork 389
coverlet.console with exit codes (ExitCodes.cs) #1746
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
Added a static readonly string `_expectedResult` in the `Msbuild` class to hold the expected output format. Updated multiple assertions to use this variable instead of hardcoded strings, enhancing maintainability and readability of the test code.
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 backports changes to support exit codes in coverlet.console, addressing issue #1747 and merging relevant changes from PR #1660. Key changes include updating project dependencies and references, modifying exit-code handling in both tests and the console program, and adjusting documentation accordingly.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
test/coverlet.integration.tests/coverlet.integration.tests.csproj | Added a project reference for coverlet.console to the integration tests |
test/coverlet.integration.tests/Msbuild.cs | Updated test assertions to use a static expected result string |
test/coverlet.integration.tests/DotnetTool.cs | Captured and asserted command exit codes for tool invocations |
test/coverlet.integration.template/DeepThought.cs | Added an uncovered method for testing coverage reporting |
src/coverlet.console/Program.cs | Revised exit code handling by replacing local exitCode with a static field s_exitCode and updating logging behavior |
src/coverlet.console/ExitCodes.cs | Removed the CommandParsingException exit code (102) |
Others | Updated dependencies and documentation to reflect exit-code changes |
Comments suppressed due to low confidence (1)
src/coverlet.console/Program.cs:361
- Overwriting s_exitCode here may result in losing earlier error information (e.g. a test failure being masked by a subsequent threshold failure). Consider whether aggregating errors or prioritizing one exit code over the other is the intended behavior.
s_exitCode = (int)CommandExitCodes.TestFailed;
Uh oh!
There was an error while loading. Please reload this page.