-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
VS Code problemMatcher-friendly reporter #438
Comments
Did you see the JSON reporter? https://knip.dev/features/reporters#json
Nice! Great to see Knip used like this.
That's a good RFC.
What would be the best way to go about this? Use the JSON reporter as a basis, or implement a new reporter for VS Code? Either way, I'll try to read up on the topic a bit more when I can, I'm not familiar with this part of VS Code at all. Anybody reading this, definitely feel free to pick this up, might be a fun task. |
Yes! You'd think JSON output would be perfect for consuming from another tool, but so far as I can tell VS Code problemMatchers really want line-based output.
Want me to file an issue for this?
I'd suggest implementing a new reporter that outputs in the exact same format as eslint, tsc or some other tool that VS Code has a built-in matcher for. |
Did you try creating a custom reporter that is vscode problemMatchers friendly ? |
That's what this issue is proposing :) I haven't taken a crack at it myself yet. |
I'd like to have a VS Code Task for knip that has a problemMatcher. The output format of knip isn't the best for parsing. Here's an example of what I see:
Here's a
problemMatcher
that I've written that at least matches the "Unused exports" bit:This works pretty well:
But it's a bit of a bummer that I had to write these regexes and that there aren't line numbers for the unused devDependencies.
So call this a feature request for a new reporter that's compatible with one of VS Code's built-in problem matchers, for example "tsc" or "eslint".
The text was updated successfully, but these errors were encountered: