sonar扫描仪分析在util.lang.ConcreteReceiverGuard

时间:2017-08-28 12:12:12

标签: java sonarqube sonarqube-scan

我正在使用sonar-java和以下配置对java项目进行声纳分析:

SonarQuber Servcer 5.6
Sonar-java 4.10.0.10260
SonarQube Scanner 3.0.3.778
Java 1.8.0_121 Oracle Corporation (64-bit)

当我开始进行声纳分析时,它似乎正在工作,直到我得到以下日志,然后分析继续运行永远(上次它整夜运行):

util.lang.ConcreteReceiverGuard reports a runtime deprecation: calling method "padl.kernel.impl.CodeLevelModel.create()" from class "it.unibz.sonarqube_plugin.ExampleSensor"
Please use the methods in "padl.generator.helper.ModelGenerator" to obtain code-level models.

我怎样才能看出出了什么问题以及如何解决?

我应该注意:

  • 有几个项目使用相同的服务器和相同的规则,它们具有相同的消息,但分析仍在继续。
  • 即使我使用调试标志运行sonar-scanner -X,我也不会收到更多消息。

如果需要,此处会显示分析的完整日志(请注意,当jenkins发布作业任务启动分析时,问题也会出现):

INFO: Scanner configuration file: XXX\sonar-scanner.properties
INFO: Project root configuration file: XXX\sonar-project.properties
INFO: SonarQube Scanner 3.0.3.778
INFO: Java 1.8.0_121 Oracle Corporation (64-bit)
INFO: Windows 7 6.1 amd64
INFO: User cache: XXX\.sonar\cache
INFO: Load global repositories
INFO: Load global repositories (done) | time=102ms
INFO: User cache: XXX\.sonar\cache
INFO: Load plugins index
INFO: Load plugins index (done) | time=6ms
INFO: SonarQube server 5.6
INFO: Default locale: "fr_FR", source code encoding: "UTF-8"
INFO: Process project properties
INFO: Load project repositories
INFO: Load project repositories (done) | time=112ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=16ms
INFO: Load active rules
INFO: Load active rules (done) | time=153ms
INFO: Publish mode
INFO: -------------  Scan Pricing - Serveur
INFO: Load server rules
INFO: Load server rules (done) | time=84ms
INFO: Base dir: XXX\server
INFO: Working dir: XXX\server\.scannerwork
INFO: Source paths: src
INFO: Source encoding: UTF-8, default locale: fr_FR
INFO: Index files
INFO: Excluded sources: 
INFO:   src/main/js/node_modules/**
INFO:   src/main/webapp/**
INFO: 584 files indexed
INFO: 230 files ignored because of inclusion/exclusion patterns
INFO: Quality profile for java: XXX Java
INFO: Sensor Lines Sensor
INFO: Sensor Lines Sensor (done) | time=77ms
INFO: Sensor JavaSquidSensor
INFO: Configured Java source version (sonar.java.source): 7
INFO: JavaClasspath initialization
INFO: JavaClasspath initialization (done) | time=6ms
INFO: JavaTestClasspath initialization
INFO: JavaTestClasspath initialization (done) | time=0ms
INFO: Java Main Files AST scan
INFO: 584 source files to be analyzed
INFO: 213/584 files analyzed, current file: XXX\XXX.java
INFO: 255/584 files analyzed, current file: XXX\XXX.java
INFO: 473/584 files analyzed, current file: XXX\XXX.java
INFO: Java Main Files AST scan (done) | time=35221ms
INFO: 584/584 source files have been analyzed
INFO: Java Test Files AST scan
INFO: 0 source files to be analyzed
INFO: Java Test Files AST scan (done) | time=0ms
INFO: 0/0 source files have been analyzed
INFO: Sensor JavaSquidSensor (done) | time=35823ms
INFO: Sensor ExampleSensor
INFO: BaseDir----->XXX\server
Analysing Test...
util.lang.ConcreteReceiverGuard reports a runtime deprecation: calling method "padl.kernel.impl.CodeLevelModel.create()" from class "it.unibz.sonarqube_plugin.ExampleSensor"
Please use the methods in "padl.generator.helper.ModelGenerator" to obtain code-level models.

1 个答案:

答案 0 :(得分:1)

在执行Sensor ExampleSensor期间,您的分析失败了。此分析步骤由SonarQube服务器上安装的其中一个插件提供(显然是it.unibz.sonarqube_plugin.ExampleSensor)。

您需要联系此(可能是专有的)插件的维护者并将其提交给他们(可能是一个错误)。或者至少与您的SonarQube管理员共享此上下文(如果没有意图让示例传感器影响现实生活中的项目)。

相关问题