-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Can you add problemMatcher? #150
Comments
This is a great start! May I suggest to turn it into a PR? Also there are few wrinkles - with the proposed matcher, not all problems end up parsed. This below output only produces 1 problem and for 1 file only:
|
I was able to improve problemMatcher to grab all 2- and 3-line results, used an array of 2 problemMatchers (1st works for 3-line errors, 2nd works for 2-line errors, and don't ask me why it works - I have no idea,
The result in "PROBLEMS" is complete: |
Copying some of my response from #221 (comment): After some testing, it doesn't look like the matcher proposed above properly works when it is provided by the extension, unlike how it works when used in the project's configuration. VS Code has proper multiline message support tracked in microsoft/vscode#112686 and programmatic matcher support tracked in microsoft/vscode#59337, either of which would resolve this issue and let us correctly match Stylelint's default formatter. In the meantime, we could implement problem matchers for Stylelint formatters that don't have multiline messages, which would work just fine with current support. |
One solution is to use "problemMatcher": {
"source": "stylelint",
"owner": "stylelint",
"fileLocation": "absolute",
// Similar to ESLint-compact
"pattern": {
"regexp": "^(.+): line (\\d+), col (\\d+), (\\w+) - (.+)( \\((.+)\\))?$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5,
"code": 6,
},
}, |
I'd like to have problemMatcher to faster go around stylelint errors in vscode, when launching stylelint via task
I'm not sure if it is possible inject into extension problem matcher, but I wrote matcher that works.
Here's an example of default problem matchers.
And task with stylelint problem matcher:
The text was updated successfully, but these errors were encountered: