Open bcaudan opened 7 years ago
I'd like to support both, but certainly the first would require me to write and maintain a TypeScript parser to do the highlighting which is an order of magnitude more overhead than I'm willing to take on.
Duplications I think you can do without a parser though, or at least have a decent bash at.
@Pablissimo maybe you could use some libraries from typescript itself? Microsoft tries to make reusable instruments, like ie. language-server. Java can run javascript through nashorn.
Duplications typically need a lexer output. It's not hard to write own (~50 LOC or so + separeted small channel for string literals), but i hope something can be found at MS side
Worth looking at for sure - having access to the language service stuff underpinning the actual TS compiler would also allow better parsing of LCOV coverage data, avoiding flagging non-executable lines as covered or not which relates to another issue around here somewhere...
For duplication, the project below use JSCPD: https://github.com/kucherenko/jscpd
https://github.com/groupe-sii/sonar-web-frontend-reporters https://github.com/groupe-sii/sonar-web-frontend-plugin
Worth a look. A collaboration would be nice as they don't support Sonar 6. But it is fully featured so we are using it with Sonar 4.5 and get all reports including test coverage for Typescript.
@Pablissimo just want to point you to https://github.com/SonarSource/SonarTS-Plugin/commits/master
~it's alive!~ some commits included
Thanks! Sorry, been away from non-work development for a bit. Indeed - I need to have a chat with them and see what their roadmap is.
Is there any plan to add in this plugin features like:
as described in https://docs.sonarqube.org/display/DEV/Supporting+New+Languages?