Maven项目中的TypeScript分析

Maven项目中的TypeScript分析,maven,typescript,sonarqube,Maven,Typescript,Sonarqube,我将尝试使用SonarQube SonarTS插件来分析我的一个项目中的TypeScript文件 它包含一个子模块,其中包含一些图像、一些XML和几个.ts文件。我已经在SonarQube中安装了SonarTS()。该项目使用typescript 2.4.2作为开发依赖项,并使用节点6.13.1构建 当我调用mvn sonar:sonar-Dsonar.branch=(我知道sonar.branch已被弃用,我将很快修复:),最终扫描sum模块,这是日志: [INFO] ------------

我将尝试使用SonarQube SonarTS插件来分析我的一个项目中的TypeScript文件

它包含一个子模块,其中包含一些图像、一些XML和几个.ts文件。我已经在SonarQube中安装了SonarTS()。该项目使用typescript 2.4.2作为开发依赖项,并使用节点6.13.1构建

当我调用
mvn sonar:sonar-Dsonar.branch=
(我知道sonar.branch已被弃用,我将很快修复:),最终扫描sum模块,这是日志:

[INFO] -------------  Scan MyProject
[INFO] Base dir: /home/jenkins/workspace/my-project/my-project-config-model
[INFO] Working dir: /home/jenkins/workspace/my-project/my-project-config-model/target/sonar
[INFO] Source paths: pom.xml
[INFO] Source encoding: UTF-8, default locale: en_US
[INFO] Index files
[INFO] 1 file indexed
[INFO] Quality profile for xml: Sonar way
[INFO] Sensor Embedded CSS Analyzer Sensor [css]
[INFO] 0 source files to be analyzed
[INFO] Sensor Embedded CSS Analyzer Sensor [css] (done) | time=1ms
[INFO] Sensor SonarJavaXmlFileSensor [java]
[INFO] 0/0 source files have been analyzed
[INFO] 1 source files to be analyzed
[INFO] Sensor SonarJavaXmlFileSensor [java] (done) | time=31ms
[INFO] 1/1 source files have been analyzed
[INFO] Sensor XML Sensor [xml]
[INFO] Sensor XML Sensor [xml] (done) | time=8ms
[INFO] SCM provider for this project is: git
[INFO] 1 files to be analyzed
[INFO] 0/1 files analyzed
扫描的唯一文件是pom.xml

这可能与子模块的结构有关吗?xmls和ts文件不在
src/main/{ts|resources}
中,而是
src/models
src/scripts


提前谢谢

我想您需要更改
sonar.sources
参数以包括您的源文件夹(类似
sonar.sources=src/main/java、src/models、src/scripts
应该可以工作)


您可以找到更多关于分析参数的信息,以及更多关于配置maven扫描仪的方法的信息。

非常感谢!我们已经在一些示例中看到了这一点,但还没有找到信息,如果为空,将使用默认的maven值。谢谢