webpro-nl / knip

✂️ Find unused files, dependencies and exports in your JavaScript and TypeScript projects. Knip it before you ship it!
https://knip.dev
ISC License
7.07k stars 177 forks source link

Junit reporter #568

Open mrdannael opened 8 months ago

mrdannael commented 8 months ago

Could it be possible to include a JUnit reporter as part of Knip? For example, Bitbucket (and Jenkins, I believe, along with potentially other platforms) is capable of reading JUnit XML reports and displaying errors in a separate pipeline tab for end users. The reporter itself would generate an XML file containing all caught unused dependencies, unused exports, etc.

If that's acceptable to you, I can prepare a pull request for this feature/reporter. 😊

webpro commented 8 months ago

Yes, that's interesting :)

You can already use custom reporters, but would be great to include them with Knip for others to enjoy as well.

voxpelli commented 7 months ago

Similar one used by eg GitHub: https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning