sonarqube typescript plugin: “You must install a plugin that supports the language”

梦想的初衷 提交于 2019-12-02 23:29:22

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?

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!