sonarqube

Sonar Plugin Development - Create a global metric

丶灬走出姿态 提交于 2020-01-03 02:30:13
问题 I'm trying to create a custom sonar plugin that consists of a widget on the global dashboard. I want this to display a "global" metric. So for example, a metric showing the number of lines across all projects. Is this possible, if so how can I go about this? I can only find example projects that run project specific metrics. They output them in the ruby template like this: format_measure('random') . I am guessing this format measure only works in project context. The documentation is

java plugin 3.8 - S2583 false positive

一笑奈何 提交于 2020-01-02 07:05:10
问题 I think we found a false positive: private static void copy(File from, File to) throws FileNotFoundException, IOException { FileChannel src = null; FileChannel dst = null; try { src = new FileInputStream(from).getChannel(); dst = new FileOutputStream(to).getChannel(); dst.transferFrom(src, 0, src.size()); } finally { if (src != null) { Change this condition so that it does not always evaluate to "true" or do I miss anything? another example: if (lastUpdate == null|| lastUpdate != null &&

how to launch sonarqube?

情到浓时终转凉″ 提交于 2020-01-02 02:20:12
问题 for my studies I need to install sonarqube on an ubuntu server. I installed it following this tutorial : http://www.naturalborncoder.com/methodology/2015/05/27/sonarqube-on-ubuntu-14-04/ (I stopped before the proxying part) but I can't access to 127.0.0.1:9000. From the logs it look like there is a problem with elasticsearch when i launch sonarcube. /opt/sonar/log/sonar.log : --> Wrapper Started as Daemon Launching a JVM... Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org Copyright

SonarQube: Fail to get bootstrap index from server: Status returned by url [http://hostname:9095/sonar/batch/index] is not valid: [403]

陌路散爱 提交于 2020-01-02 01:11:10
问题 I am trying to execute following maven command from jenkins job, mvn clean install sonar:sonar -Dsonar.host.url=http://hostname:9095/sonar -Dsonar.projectKey=mavensample -Dsonar.login=admin -Dsonar.password=admin -X But it fails with following error, [DEBUG] 18:20:49.119 Download: http://hostname:9095/batch/index [ERROR] 18:20:49.176 SonarQube server [http://hostname:9095] can not be reached [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE

SonarQube on Java8-project gives jacoco-Exception

删除回忆录丶 提交于 2020-01-02 00:43:46
问题 I just downloaded the latest version, SonarQube 4.3, then try build a java-8 project with: mvn clean install mvn sonar:sonar That gives me the Exception below. Googling, I got the impression this is an earlier issue that should have been fixed... ? http://sonarqube.15.x6.nabble.com/Sonar-analyze-Java-1-8-project-Failure-td5023663.html http://jira.codehaus.org/browse/SONARJAVA-482 Does SonarQube 4.3 support java-8? Or any clue, what is the problem? ---------------------------------------------

SonarQube on Java8-project gives jacoco-Exception

二次信任 提交于 2020-01-02 00:42:53
问题 I just downloaded the latest version, SonarQube 4.3, then try build a java-8 project with: mvn clean install mvn sonar:sonar That gives me the Exception below. Googling, I got the impression this is an earlier issue that should have been fixed... ? http://sonarqube.15.x6.nabble.com/Sonar-analyze-Java-1-8-project-Failure-td5023663.html http://jira.codehaus.org/browse/SONARJAVA-482 Does SonarQube 4.3 support java-8? Or any clue, what is the problem? ---------------------------------------------

Sonarqube default coverage to 0 from Karma Coverage LCOV file with absolute pathjs

我们两清 提交于 2020-01-01 19:30:25
问题 Sonar does not retrieve the coverage information for my project when paths are absolute in my lcov file. For the file: TN: SF:/mnt/vg01-data01/jenkins/<jenkins.myhost.com>/jenkins_home/workspace/<job1>/src/app.js FN:,(anonymous_0) FN:,(anonymous_1) FNF:2 FNH:2 FNDA:1,(anonymous_0) FNDA:2,(anonymous_1) DA:3,1 DA:4,1 DA:6,1 DA:7,1 DA:8,1 DA:9,1 DA:11,1 DA:18,1 DA:19,1 DA:22,2 DA:27,1 LF:11 LH:11 BRF:0 BRH:0 end_of_record .... I get the following warnings: ... 05:06:27.565 INFO: Analysing [/srv

sonar-maven-plugin 5.1.1 not found

杀马特。学长 韩版系。学妹 提交于 2020-01-01 18:54:09
问题 I've just installed the latest version of SonarQube (5.1.1) and when I try to run the sonar:sonar target, I get an error: Embedded error: Unable to build project for plugin 'org.codehaus.sonar:sonar-maven-plugin': POM 'org.codehaus.sonar:sonar-maven-plugin' not found in repository: Unable to download the artifact from any repository org.codehaus.sonar:sonar-maven-plugin:pom:5.1.1 I've checked here: http://mvnrepository.com/artifact/org.codehaus.sonar/sonar-maven-plugin And it seems that

Quality Gate Failure in SonarQube does not fail the build in Teamcity

时光毁灭记忆、已成空白 提交于 2020-01-01 11:58:10
问题 I set up a Build project in TeamCity and integrated Sonarqube with it. The project is getting build and even publish the report successfully in SonarQube console. But when the quality gate fails, it's not breaking the build. I searched and read about the build breaker, but its already supported with Sonarqube plugin of TeamCity as this document https://confluence.jetbrains.com/display/TW/SonarQube+Integration Am I missing something to configure/or any gotcha? I tried to search a lot but didn

Running code coverage with Cobertura and Jacoco

前提是你 提交于 2020-01-01 06:26:16
问题 I have a bit of a problem getting code coverage reports for both Integration Tests and Unit Tests in Sonar for a Maven Plugin project (which uses invoker plugin for the integration tests). I can't use the default Jacoco coverage tool for the unit tests, as these use Powermock, which results in 0% coverage for classes using that. On the other hand, I can't find a reliable way to get results for the Groovy-based integration tests without using Jacoco. So what I need is for Cobertura to produce