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

前端 未结 2 2029
别那么骄傲
别那么骄傲 2021-02-04 10:43

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:<

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-04 11:04

    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?

提交回复
热议问题