-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Support "severity" in ProblemMatcher (next to ProblemPattern) #204
Comments
@TrueBrain severity is supported. The docs were merged recently: https://github.com/actions/toolkit/blob/master/docs/problem-matchers.md |
Although the translation problem still exists. Only the string "warning" and "error" are supported. Interested in ideas. |
Exactly why I created this ticket ;) I do want to put emphasis on the fact that this problem is already solved by VSCode. And given ProblemMatchers strongly resemble the one used by VSCode, solving them both in the same way would be greatly appreciated :) This I tried to make clear in my original ticket: there is a difference between ProblemMatcher and ProblemPattern. VSCode implements both, GitHub Actions currently only the latter (in context of severity, of course). |
@TrueBrain sorry i am not seeing it in their docs. Do you have a link to the docs how vscode solves this? |
I was thinking something like two new properties |
nevermind i think i see how they solved it. They have it higher up in the structure, above the patterns... |
Basically sibling to owner. In that case i think you would need to define the matcher twice, once for errors. And then again as a separate owner, for warnings. |
It's supported by the current runner in PROD now. |
pr for doc updates https://github.com/actions/toolkit/pull/256/files |
@ericsciple I do not understand how this documenation change above describes how is this supported. |
@zsedem sibling to So for the flake8 scenario, you would create two matchers. For example:
Let me know if that helps |
yes, that answers my question |
Currently the Problem Matcher only support "severity" as group in the ProblemPattern (see #186 (comment)); VSCode also supports this as fixed field in the ProblemMatcher (see https://code.visualstudio.com/docs/editor/tasks-appendix).
It would be a nice addition to see the same functionality in GitHub Actions; this would mean Problem Matcher works the same in VSCode as in GitHub Actions.
A use case: 'flake8' returns codes like E100, W200, F300. E stands for error, W for warning, F for fatal. Have the warnings as warnings (and errors and fatals as errors) is currently not supported with the current implementation of Problem Matcher.
The current workaround is one ugly
sed
. For example:https://github.com/TrueBrain/actions-flake8/blob/initial_work/entrypoint.sh#L13
Solving this would greatly reduce the complexity of such actions (in fact, it would make it trivial).
The text was updated successfully, but these errors were encountered: