What does SonarQube do with the tslint.json?

230 views
Skip to first unread message

wansart....@gmail.com

unread,
Dec 13, 2017, 5:15:03 AM12/13/17
to SonarQube
Hello,

I have a Angular project which will be analyzed by SonarQube running the following command:

sonar-scanner -Dsonar.exlusions=node_modules/** \
              -Dsonar.sources=src \
              -Dsonar.projectName=my_project_fronted \
              -Dsonar.projectKey=my_project_frontend \
              -Dsonar.host.url=http://ip-to-sonar:9000/sonar \
              -Dsonar.ts.tslint.configPath=tslint.json
              -Dsonar.ts.tslint.typeCheck=true

The tslint.json does not require to add all modules to the package.json, whereas the SonarQube reports many code smells:
Module 'app' is not listed as dependency in package.json

So, what does SonarQube use the tslint.json anyways when it just use its own rules?

Regards,
Christian

wansart....@gmail.com

unread,
Dec 13, 2017, 5:28:00 AM12/13/17
to SonarQube
There is a missing \ on the configPath line. In my local file this is just one line so there is not issue with that.

G. Ann Campbell

unread,
Dec 13, 2017, 5:40:31 AM12/13/17
to SonarQube
Hi Christian,

Thanks for the follow-up. I'm glad you worked through this!


Ann

Elena Vilchik

unread,
Dec 26, 2017, 5:10:00 AM12/26/17
to SonarQube
Hello,

Just for the sake of clarity: you are using community plugin for TypeScript (this one probably https://github.com/Pablissimo/SonarTsPlugin).
The official SonarSource TypeScript plugin - SonarTS (https://github.com/SonarSource/SonarTS) doesn't use or support tslint.json.

Regards,
Elena
Reply all
Reply to author
Forward
0 new messages