我正在使用声纳扫描仪来分析C ++代码,这确实有效,但在从7.0升级到7.1后它不再有效。我甚至确保升级声纳扫描仪本身,但无济于事。它似乎在加载分支配置时遇到问题,但我不明白它有什么问题。我也设置-Dsonar.branch.name =设置,但即使我删除它我得到相同的错误。有什么想法吗?
var firstContent, secondContent;
function initialize() {
firstContent = $('.first');
secondContent = $('.second');
}
function bindEvents() {
$('[type="radio"]').on('change', function() {
render();
});
}
function render() {
if(1 == $('[type="radio"]:checked').val()) {
firstContent.show();
secondContent.hide();
} else {
firstContent.hide();
secondContent.show();
}
}
initialize();
bindEvents();
render();
扩展调试:
INFO: Load project branches
INFO: Load project branches (done) | time=79ms
INFO: Load branch configuration
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 2.868s
INFO: Final Memory: 26M/196M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: Unable to load component class org.sonar.scanner.scan.ProjectLock
ERROR: Caused by: Unable to load component class org.sonar.scanner.scan.DefaultInputModuleHierarchy
ERROR: Caused by: Unable to load component class org.sonar.scanner.scan.ProjectBuildersExecutor
ERROR: Caused by: Unable to load component class com.talanlabs.sonar.plugins.gitlab.CommitProjectBuilder
ERROR: Caused by: Unable to load component class com.talanlabs.sonar.plugins.gitlab.GitLabPluginConfiguration
ERROR: Caused by: Unable to load component class org.sonar.scanner.scan.MutableProjectSettings
ERROR: Caused by: Unable to load component class org.sonar.scanner.repository.ProjectRepositories
ERROR: Caused by: Unable to load component interface org.sonar.scanner.scan.branch.BranchConfiguration
ERROR: Caused by: com.sonarsource.branch.A.load(Ljava/util/Map;Ljava/util/function/Supplier;Lorg/sonar/scanner/scan/branch/ProjectBranches;Lorg/sonar/scanner/scan/branch/ProjectPullRequests;)Lorg/sonar/scanner/scan/branch/BranchConfiguration;
答案 0 :(得分:0)
您必须将Branch插件升级到至少7.1:
+------------------------+---------+-----------+
| SonarQube Version | 6.7 LTS | 7.0 | 7.1 |
|------------------------|---------|-----------|
| Branch minimal version | 1.0 | 7.0 | 7.1 |
+------------------------+---------+-----------+
阅读插件版本兼容性矩阵here。
答案 1 :(得分:0)
将sonar-gitlab-plugin更新为新版本(版本4.1.0-SNAPSHOT):
https://github.com/gabrie-allaigre/sonar-gitlab-plugin/releases