Ism*_*Sen 6 javascript java multilingual code-analysis sonarqube
我正在尝试用Sonar 4.2分析我的JEE项目.这是一个使用Java和JS的多语言JEE项目.
我添加到Sonar 4.2的插件是:Java 2.1和JavaScript 1.6.
近日,声纳增加了多语言的分析,下面的文档,我已经去除了sonar.language从sonar-project.properties.但它仍然只分析Java.
我在Jenkins 1.555中使用Sonnar Runner 2.3.它在每次构建后分析项目.
我错过了什么吗?
编辑:sonar-project.properties:
# Required metadata
sonar.projectKey=myProjectKey
sonar.projectName=MyProject
sonar.projectVersion=1.0
# Path to the parent source code directory.
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
# Since SonarQube 4.2, this property is optional. If not set, SonarQube starts looking for source code
# from the directory containing the sonar-project.properties file.
sonar.sources=src/main/java
# Encoding of the source code
sonar.sourceEncoding=UTF-8
Run Code Online (Sandbox Code Playgroud)
谢谢
Dav*_*cia 12
你有Sonar从src/main/java中寻找源代码,所以它找不到你的js代码.将其更改为:
sonar.sources=src/main
Run Code Online (Sandbox Code Playgroud)
Sonar将自动从/ java进行java分析,并从/ webapp进行javascript分析