You've already forked setup-msbuild
mirror of
https://github.com/microsoft/setup-msbuild.git
synced 2026-09-25 11:17:01 +07:00
a5f6b5adfd
- Add .github/msbuild.json with two owners: one matching file-based diagnostics (File(line,col): error/warning CODE: msg [project]) and one matching engine-level errors without file/line info. - Register the matcher in src/main.ts via the ##[add-matcher] workflow command, resolved relative to __dirname so it works from the ncc bundle in dist/. - Add src/__tests__/msbuild-matcher.test.ts validating the matcher regexes against representative CS/MSB error and warning lines. - Document the new problem matcher in README.md. - Rebuild dist/index.js via npm run build && npm run pack. Fixes #4 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
31 lines
698 B
JSON
31 lines
698 B
JSON
{
|
|
"problemMatcher": [
|
|
{
|
|
"owner": "msbuild",
|
|
"pattern": [
|
|
{
|
|
"regexp": "^\\s*(?:\\d+>\\s*)?([^\\s].*?)\\((\\d+)(?:,(\\d+))?(?:,\\d+)*\\)\\s*:\\s*(error|warning)\\s+([A-Za-z]+\\d+)\\s*:\\s*(.*?)(?:\\s+\\[(.+?)\\])?\\s*$",
|
|
"file": 1,
|
|
"line": 2,
|
|
"column": 3,
|
|
"severity": 4,
|
|
"code": 5,
|
|
"message": 6,
|
|
"fromPath": 7
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"owner": "msbuild-no-location",
|
|
"pattern": [
|
|
{
|
|
"regexp": "^(?!.*\\().*\\b(error|warning)\\s+([A-Za-z]+\\d+)\\s*:\\s*(.*)$",
|
|
"severity": 1,
|
|
"code": 2,
|
|
"message": 3
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|