Expand the CSC problem matcher to light up more errors on GitHub.#717
Open
StephenCleary wants to merge 1 commit intoactions:mainfrom
Open
Expand the CSC problem matcher to light up more errors on GitHub.#717StephenCleary wants to merge 1 commit intoactions:mainfrom
StephenCleary wants to merge 1 commit intoactions:mainfrom
Conversation
Expand csc problem matcher with more real-world scenarios.
There was a problem hiding this comment.
Pull request overview
This PR expands the GitHub Actions CSC problem matcher regex so it recognizes a wider variety of real-world compiler/analyzer error formats (including dotnet msbuild prefixes and dotnet format-style codes), and updates tests to cover the new parsing behavior.
Changes:
- Updated
.github/csc.jsonregex to allow leading whitespace and optional MSBuild project-number prefixes (e.g.,20>), capture column numbers, and allow non-numeric error codes. - Extended Jest coverage with multiple real-world-inspired matcher examples (including
dotnet formatand MSBuild-prefixed output). - Refactored the test to use
test.eachfor clearer case-by-case validation.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
__tests__/csc.test.ts |
Adds multiple test cases validating the expanded matcher behavior and captured groups (including column). |
.github/csc.json |
Expands the matcher regex and updates capture-group mapping (adds column, shifts indices). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Author
|
CC @baronfel |
|
Nice now we just have to wait for the maintainers of this repo and they are always super slow #701 |
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.
Description:
This extends the csc problem matcher to support more flexible error message syntax, with tests. All examples have been seen in actual GHA runner output (these are anonymized real-world cases).
There are three changes to the regex:
10>) are allowed. This is necessary fordotnet msbuilderror parsing as well asdotnet builderror parsing in some scenarios.dotnet formaterror parsing.Related issue:
Replaces #691. Also see #583 which takes the alternative approach of adding an independent problem matcher for
dotnet format(this PR includesdotnet formaterrors in the csc problem matcher).Check list: