Possibility to specify custom reporter via CLI and by .jsinspectrc
Hi,
Currently it's only possible to select one of the build in reporters.
It would be great if custom reporter could be specified via CLI or .jsinspectrc config file. It would enable the creation of custom reporters (in separate npm packages)... like it is possible e.g. in JSCPD or ESLint.
In this context, it would probably also make sense to expose the base reporter in the lib/reporters/index.js file to simplify writing custom reporters...
It would be pretty straightforward to implement. Curious, what sort of custom reporter are you interested in using with the tool?
In my context (we use the tool for projects at work) I can think of two reporters 😄
- A TeamCity reporter: This can be done quite easy via Build Script Interaction. Obviously it would make sense to publish this one to the public.
- And then we have some custom internal reporting platform which provides a central place for all kinds of our services/projects health (unit tests, code quality/analysis, E2E tests, open issues, etc.) with dashboards et al. I would like to report the results to this platform. This reporter probably cannot be made public since it would expose some internal information of ours.
Again... would be great if I could be done. I'm happy to assist, e.g. by testing a prerelease version...
According to https://confluence.jetbrains.com/display/TCD65/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ReportingFxCop
it could be possible to run jsinspect with:
jsinspect -r pmd src/ > coverage.xml
echo "##teamcity[importData type='pmdCpd' path='duplicate.xml']"
and it works! (be warning to specify src/ directory)