-
Notifications
You must be signed in to change notification settings - Fork 392
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
Add a problem matcher for gcc warnings/errors: for develop commits, and branch of PR #10832
Conversation
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "gcc-problem-matcher", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"severity": 4, | ||
"message": 5 | ||
} | ||
] | ||
} | ||
] | ||
} |
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.
cf https://regex101.com/r/4mPjR3/1 for demo
run: | | ||
echo "::add-matcher::.github/workflows/cpp-problem-matcher.json" | ||
cmake --build . -j ${{ matrix.nproc }} --config Release | ||
echo "::remove-matcher owner=gcc-problem-matcher::" |
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.
building develop commits, we add it, build, and remove it.
run: | | ||
echo "::add-matcher::.github/workflows/cpp-problem-matcher.json" | ||
cmake --build . -j ${{ matrix.nproc }} --config Release | ||
echo "::remove-matcher owner=gcc-problem-matcher::" |
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.
Testing PR: enable it only when building the PR branch (not develop for regression)
Nailed it! OK, so the add-matcher command seems to ignore working-directory. Good to know. Thanks @jmarrec this was fun and will be very helpful. |
Pull request overview
Pwned from https://github.com/microsoft/vscode-cpptools/blob/bfa3c7544ef63e7e0b6d0bd6bf8a1363ed3c4deb/Extension/package.json#L439
Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Reviewer
This will not be exhaustively relevant to every PR.