我现在正在使用Sonarqube 5.1,尝试启用java解析器失败规则,但之后,Sonarqube仍然没有将解析器失败记录为问题,我做错了什么?
以下是我的声纳配置文件
的内容sonar.projectKey=test
sonar.projectName=test
sonar.projectVersion=1.0
sonar.sources=.
sonar.language=java
这是输出日志,
SonarQube Runner 2.4
Java 1.8.0_45-internal Oracle Corporation (64-bit)
Linux 3.19.0-18-generic amd64
INFO: Runner configuration file: /usr/bin/sonar-runner/conf/sonar-runner.properties
INFO: Project configuration file: /home/administrator/tmp2/sonar.properties
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Work directory: /home/administrator/tmp2/./.sonar
INFO: SonarQube Server 5.1
18:09:03.983 INFO - Load global repositories
18:09:04.133 INFO - Load global repositories (done) | time=153ms
18:09:04.135 INFO - Server id: 20150604145702
18:09:04.137 INFO - User cache: /home/administrator/.sonar/cache
18:09:04.147 INFO - Install plugins
18:09:04.230 INFO - Install JDBC driver
18:09:04.237 INFO - Create JDBC datasource for jdbc:mysql://172.17.128.76:3306/sonar?useUnicode=true&characterEncoding=utf8
18:09:05.715 INFO - Initializing Hibernate
18:09:07.396 INFO - Load project repositories
18:09:07.505 INFO - Load project repositories (done) | time=109ms
18:09:07.505 INFO - Load project settings
18:09:07.861 INFO - Load technical debt model
18:09:07.895 INFO - Apply project exclusions
18:09:08.190 WARN - SCM provider autodetection failed. No SCM provider claims to support this project. Please use sonar.scm.provider to define SCM of your project.
18:09:08.192 INFO - ------------- Scan test
18:09:08.201 INFO - Load module settings
18:09:08.404 INFO - Language is forced to java
18:09:08.424 INFO - Load rules
18:09:08.672 INFO - Base dir: /home/administrator/tmp2
18:09:08.672 INFO - Working dir: /home/administrator/tmp2/.sonar
18:09:08.673 INFO - Source paths: .
18:09:08.673 INFO - Source encoding: UTF-8, default locale: en_US
18:09:08.674 INFO - Index files
18:09:08.691 INFO - 1 files indexed
18:09:08.959 INFO - Quality profile for java: My way
18:09:08.993 INFO - Sensor JavaSquidSensor
18:09:09.601 INFO - Java Main Files AST scan...
18:09:09.605 INFO - 1 source files to be analyzed
18:09:09.622 ERROR - Unable to parse source file : /home/administrator/tmp2/Test.java
18:09:09.622 ERROR - Parse error at line 4 column 3:
1: public class Test {
2: public static void main(String[] args){
3: int a = 1
4: }
^
5: }
6:
18:09:09.647 INFO - Java Main Files AST scan done: 46 ms
18:09:09.648 WARN - Java bytecode has not been made available to the analyzer. The org.sonar.java.bytecode.visitor.DependenciesVisitor@6b86fed8, org.sonar.java.checks.UnusedPrivateMethodCheck@7d131ef1, org.sonar.java.checks.RedundantThrowsDeclarationCheck@15f45ace are disabled.
18:09:09.648 INFO - 1/1 source files analyzed