SonarTsPlugin icon indicating copy to clipboard operation
SonarTsPlugin copied to clipboard

Improve coverable-lines-of-code tracking

Open Pablissimo opened this issue 8 years ago • 1 comments

Need to filter LCOV output to ignore non-executable lines, since source mapping will frequently claim a line that is just a definition in TypeScript is actually executed (due to the fact that it really is executed in JS land).

Pablissimo avatar Feb 15 '17 22:02 Pablissimo

Current thinking goes along two lines:

  1. Implement a minimal TypeScript parser to track executable lines in the TypeScript sense
  2. Implement a custom tool in TypeScript using the TypeScript language service and walk the parse tree

First one's fragile and irritating, and likely to not catch all cases (but can be done cheaply for a 90%-right-probably solution). Second one's now a new dependency for the plugin, delivered... somehow, requires Node and the tool on the box running the scanner...

Pablissimo avatar Feb 15 '17 22:02 Pablissimo