Pablissimo / SonarTsPlugin

SonarQube plugin for TypeScript files
MIT License
185 stars 106 forks source link

TSLint issues ignored on TFS Server #156

Closed psegalen closed 7 years ago

psegalen commented 7 years ago

Hi,

I have a TFS 2017 server building a TypeScript project which has a Sonar step using this plugin. TSLint seems to do the job but oddly enough, the issues all seem to be ignored. In the TFS logs I have a bunch of messages saying: WARN: TsLint reported issues against a file that isn't in the analysis set - will be ignored: ../../../../../6/s/src/XXXX.ts My sonar-project.properties content is:

sonar.projectKey=*********
sonar.projectName=*********
sonar.sources=src
sonar.exclusions=**/node_modules/**,**/build/**
sonar.ts.tslint.configPath=tslint.json
sonar.ts.tslint.path=node_modules/tslint/bin/tslint

TSLint seems to give weird relative path to the files, I assumed it was because I executed it with a local install but even after setting the global path in SonarQube, if I delete the sonar.ts.tslint.path, the plugin just doesn't find TSLint.

Did anyone encountered this behavior and what could be a workaround?

psegalen commented 7 years ago

Ok, solved! If anyone encounters this behavior, just add those lines in your sonar-project.properties file :

sonar.baseDir=.
sonar.ts.tslint.projectPath=.