Skip to content
This repository has been archived by the owner on Jul 8, 2019. It is now read-only.

Rules from tslint.json are not applied #185

Open
damodhar22 opened this issue Jan 24, 2018 · 6 comments
Open

Rules from tslint.json are not applied #185

damodhar22 opened this issue Jan 24, 2018 · 6 comments

Comments

@damodhar22
Copy link

I disabled all the 123 rules in sonar qube. Added only one rule in tslint.json. When I ran the sonar, no issues are shown even though code has the issues(it's using magic numbers which violates the tslint rule below).

Why plugin not picking rules from tslint.json??

tslint.json
{
"rules": {
"no-magic-numbers": true
}
}

sonar tsplugin properties
property "sonar.projectName", "ABC"
property "sonar.sourceEncoding", "UTF-8"
property "sonar.sources", "src"
property "sonar.language", "ts"
property "sonar.exclusions", ["node_modules/**"]
property "sonar.ts.coverage.lcovReportPath", "coverage/lcov.info"
property "sonar.ts.tslintconfigPath", "tslint.json"
property "sonar.ts.tslintpath", "node_modules/tslint/bin/tslint"
property "sonar.ts.tslintrulesDir", "node_modules/codelyzer"

@damodhar22 damodhar22 changed the title Rule from tslint.json are not applied Rules from tslint.json are not applied Jan 25, 2018
@westwick
Copy link

I am having this same issue. It seems some of the keys changed, for example I got the lcov report to work again by changing to sonar.typescript.lcov.reportPaths=coverage/lcov.info, however I cannot find what sonar.ts.tslintconfigPath has been updated to.

@nixel2007
Copy link

You use a different plugin (official one?)

@sebastienbonami
Copy link

Any news on this? I have the same problem.

@nixel2007
Copy link

Check the plugin version an author

@sebastienbonami
Copy link

@nixel2007 I'm using version v1.1.0 downloaded here: https://github.com/Pablissimo/SonarTsPlugin/releases.

What is the behavior when there are rules in a Quality Profile on Sonar and also other ones specified in tslint.json? They are concatenated?

@sebastienbonami
Copy link

I'm still looking for answers... can somebody help? @damodhar22 @westwick @nixel2007

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

No branches or pull requests

4 participants