I\'m trying to setup SonarQube to analyse my TypeScript project using this plugin: https://github.com/Pablissimo/SonarTsPlugin
However, I\'m encountering an error like:<
Here are the Possible sonar.language values
C# => "cs"
CSS => "css"
SCSS => "scss"
Less => "less"
Java => "java"
Web => "web"
XML => "xml"
JSON => "json"
JavaScript => "js"
Install the required plugin and run the Scanner using -X switch, you can find the necessary values in the sonar logs.
Okay, I figured out how to solve this specific problem. The key sonar.language
in my sonar-project.properties
should be set to ts
, not typescript
.
# Language
sonar.language=ts
I figured this out by looking at example project corresponding to the javascript plugin: https://github.com/SonarSource/sonar-examples/blob/master/projects/languages/javascript/javascript-sonar-runner/sonar-project.properties. Here, the language is set to js
not javascript
.
I have to guess that, in general, the language key should be set to the normal file extension for source files? i.e. Java -> .java, JavaScript -> .js, TypeScript -> .ts ... If so, well that's not obvious. Is there any way to confirm this hunch?