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

tslint does not produce valid JSON for multiple files #31

Open
EarthCitizen opened this issue Jun 17, 2016 · 1 comment
Open

tslint does not produce valid JSON for multiple files #31

EarthCitizen opened this issue Jun 17, 2016 · 1 comment

Comments

@EarthCitizen
Copy link

If the plugin handles this situation, then this is a non-issue, but tslint does not output valid JSON when multiple files are given for one run. For example:

tslint -t json 'src/**/*.ts'

This produces output like so:

[{"endPosition":{"character":6,"line":22,"position":885},"failure":"block is empty","name":"src/file1.ts","ruleName":"no-empty","startPosition":{"character":4,"line":22,"position":883}}][{"endPosition":{"character":50,"line":23,"position":1169},"failure":"block is empty","name":"src/file2.ts","ruleName":"no-empty","startPosition":{"character":6,"line":39,"position":1593}}]

Which is not valid JSON as it creates a [] for each file.

This is a known issue with tslint. But as long as tslint has this issue, then this plugin will have to work around that you just want to fail on the JSON parse.

I did not actually try to see what the plugin does in this case, but I wanted to make this situation known in case it was not already. So, if this is already handled, then this can just be closed.

@aurelien-baudet
Copy link
Member

Hello,

You need to use our tslintReporter that is available here : https://github.com/groupe-sii/sonar-web-frontend-reporters.
We don't consume directly tslint report as it is missing some required information.

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

No branches or pull requests

2 participants