Skip to content
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

Add line-level source map support #308

Closed
Pablissimo opened this issue Dec 27, 2014 · 4 comments
Closed

Add line-level source map support #308

Pablissimo opened this issue Dec 27, 2014 · 4 comments

Comments

@Pablissimo
Copy link
Contributor

@Pablissimo Pablissimo commented Dec 27, 2014

Chutzpah is currently able to identify a generated source file from its original source, but not to map between the two files line-by-line.

This means that for situations where a language is compiling down to JavaScript, like with Typescript, Chutzpah can't output accurate code coverage information:

  • Code coverage percentages may be inaccurate as they relate to the number of uncovered vs covered lines in the generated, rather than original source
  • Code coverage breakdowns (via the context menu extension) show the correct original source filenames, but expand to generated source

Obviously this is pretty minor, but it's something I may need for integration with Sonarqube so I'm opening this to have something to submit against!

@Pablissimo
Copy link
Contributor Author

@Pablissimo Pablissimo commented Dec 29, 2014

A very quick spike shows it's possible for TypeScript at least:
very quick spike

Works via a library I threw together to parse source maps. Only does line-level coverage though - testing minified files would still trip everything up.

@mmanela
Copy link
Owner

@mmanela mmanela commented Dec 30, 2014

That is awesome. I agree this is a minor issue but it would really tie together the code coverage functionality for coffeescript/typescript

@Pablissimo
Copy link
Contributor Author

@Pablissimo Pablissimo commented Jan 3, 2015

I've tidied up my spike with what will hopefully become a PR at some point but will run it against a 'proper' TypeScript application once I'm back in work before doing so to make sure it'll minimally do what I need it to! However, it's there for review or playing about with should anyone be interested.

@Pablissimo
Copy link
Contributor Author

@Pablissimo Pablissimo commented Jan 17, 2015

PR created: #316

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.