Expand the CSC problem matcher to light up more errors on GitHub.#717
Expand the CSC problem matcher to light up more errors on GitHub.#717StephenCleary wants to merge 1 commit into
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.
|
CC @baronfel |
|
@priya-kinthali Can you merge this? |
|
Hello @StephenCleary👋, |
|
@priya-kinthali I also requested it by #603 over a year ago and I also know some others using my branch for some time |
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: