sonarqube

No unit test success reported to sonar

旧街凉风 提交于 2019-12-10 12:55:37
问题 A gradle build is creating a jacoco report which is picked up by sonar runner. After the sonar results are pushed to the sonar server, unit test coverage is displayed but unit test success is 0 even though all tests are run successfully. Looking at the sonar runner log I see the following items reporting the source and classes locations: 15:52:36.087 INFO - Source dirs: /poc-sonar/src/main/java 15:52:36.087 INFO - Test dirs: /poc-sonar/src/test/java, /Volumes/Disk/Development/poc-sonar/src

sonar-maven-plugin: extending sonar.sources in multi-module project

偶尔善良 提交于 2019-12-10 12:33:40
问题 I want to extend sonar.sources , which by default is pom.xml,src/main/java , by src/main/resources in order to check XML files that are located there. This seemingly simple task turned out to be difficult since I have a multi-module maven project (> 100 modules, nested) with a lot of them don't have a src/main/resources folder and most of them not even a src folder (e.g. for packaging=pom). This leads to a build error if I set sonar.sources to pom.xml,src/main/java,src/main/resources or pom

sonarqube 5.x differential views KO (JSON parsing exception)

杀马特。学长 韩版系。学妹 提交于 2019-12-10 12:20:02
问题 In SONARQUBE console when I try to use differential views for my project (combo box -> “since previous analysis” or “over 30 days”) and I ask to see only the difference (new adds) I get a popup error “Fail to execute ES search request”. The problem is the JSON generated who is no JSON compliant : "pre_zone":"GMT+01:00" See the java logs below : Caused by: org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to execute phase [query], all shards failed; shardFailures {[Ke

sonar.coverage.exclusions and sonar.exclusions does not exclude the files from

て烟熏妆下的殇ゞ 提交于 2019-12-10 12:03:56
问题 I already went through : Configure Sonar to exclude files from Maven pom.xml and still SonarLint is unable to execlude those all files. Any help is much appreciated <properties> <java.version>1.8</java.version> <sonar.coverage.exclusions> **/dto/**/*, **/entity/**/*, **/exception/**/*, **/repository/**/*, **/enums/**/*, **/assembler/**/*, **/src/main/resources/sql/**/*, **/controller/**/*, **/utils/**/*, **/security/**/*, **/servlet/**/*, **/MainApplication.java </sonar.coverage.exclusions>

CSC error CS0006: Metadata file 'SonarAnalyzer.dll' could not be found

半城伤御伤魂 提交于 2019-12-10 11:56:39
问题 I'm having random problems during my build process in TeamCity. I've got two configurations: First for Rebuild + Unit test. Second as artifact dependency, with SonarQube analyzer. When Teamcity is executing first configuration, I'm receiving random error messages every 5-10 builds: CSC error CS0006: Metadata file 'E:\TeamCity\buildAgent2\temp\buildTmp\.sonarqube\resources\0\Google.Protobuf.dll' could not be found CSC error CS0006: Metadata file 'E:\TeamCity\buildAgent2\temp\buildTmp\

JaCoCo ignoring Lombok code, is this expected?

£可爱£侵袭症+ 提交于 2019-12-10 11:56:29
问题 I am using Lombok 1.18.2 and JaCoCo 0.8.3, which theoretically recognize/ignore lombok annotations. I did a test, added the lombok.addLombokGeneratedAnnotation = true param in my lombok.config and then I see the generated annotation on my target classes decompiled code. But I am surprised to open jacoco.exec file and see that things like @Getter increase the "Total Probes" values, but keep untouched the "Executed Probes" one. Is this expected? If so, how can SonarQube make smart use of it, if

Is there a plugin which will load a jacoco-it.exec data file (coverage data) into SonarQube without java source or classes present?

馋奶兔 提交于 2019-12-10 11:51:37
问题 In reading many posts there are many cases where users have used the jacoco agent to generate coverage data (i.e. created an exec data file either jacoco.exec or jacoco-it.exec). However, there are a number of questions about getting the data into SonarQube. In many of these use cases by the time the exec data file is created it is disassociated from the build time project structure. Can you load a jacoco exec data file into SonarQube without having related class or source files? If yes,

Error with sonar run

匆匆过客 提交于 2019-12-10 11:28:07
问题 [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building ps04 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- sonar-maven-plugin:3.3.0.603:sonar (default-cli) @ ps04 --- [WARNING] Error injecting: org.sonarsource.scanner.maven.SonarQubeMojo java.lang.NoClassDefFoundError: org/sonarsource/scanner/api/LogOutput at java.lang.Class.getDeclaredConstructors0

Can I run SonarQube code analysis for .NET Core (C#) on Linux?

。_饼干妹妹 提交于 2019-12-10 10:29:15
问题 I'm trying to execute and report a SonarQube code analysis (without test coverage for now) against a .NET Core project from a Linux build agent. I downloaded sonar-scanner from this page, and trying to run the report with the following command (the server url is set up in the configuration). sonar-scanner -Dsonar.projectKey="MyProject" -Dsonar.projectName="MyProject" -Dsonar.sources=$PWD The execution seems to be successful, I uploaded the full output to this gist. However, if I go to the

Sonar analysis takes long time

ⅰ亾dé卋堺 提交于 2019-12-10 10:09:42
问题 My sonar analysis takes a long time to complete. Initially it took around 20-30 mins. Later it increased to 1hr+. Now after 5 months it takes whole 5 hours. Can someone suggest the reason and how to rectify the same. I use sonarqube 4.4 with postgresql 9.3 db. The sonar db takes up almost 40G of space. If you check my log below you will notice that most of the time is spent on IndexProjectPostJob. 08:53:47.437 INFO - Executing post-job class org.sonar.plugins.core.issue.notification