sonarqube

Import checkstyle-configuration from sonar into eclipse-checkstyle-plugin

安稳与你 提交于 2019-12-19 03:36:12
问题 I want to export checkstyle rules from sonar and import them into the checkstyle eclipse plugin. Unfortunately sonar exports the checkstyle rules to a csv file. But the checkstyle plugin only accepts import of xml files. Is there any way to do that? 回答1: You can get it in checkstyle xml format by navigating to Configuration Quality Profiles -> select your Profile activate "Permalinks" tab This should give you access to the checkstyle config as xml. In Eclipse you can even configure the

SonarQube - integrationTest.exec - sonarRunner (Gradle) or “sonar-runner” command - showing 0.0% covereage

有些话、适合烂在心里 提交于 2019-12-19 03:15:22
问题 I'm successfully generating 2 .exec files by Jacoco within "build/jacoco" folder after running a Gradle based build and integration tests. Gradle command: "gradle clean build integrationTest" Once done, it generates the following .exec files under build/jacoco folder. test.exec integrationTest.exec Following is my sonar-project.properties file. When, I run "sonar-runner" from Linux prompt it completes but on SonarQube dashboard for this project, I see Unit test says some 34.5% but integration

sonar maven plugin build error, SonarQube version: null

被刻印的时光 ゝ 提交于 2019-12-19 03:13:27
问题 My jenkins builds just started to fail with this message: [INFO] --- sonar-maven-plugin:2.7:sonar (default-cli) @ cividas-core-web --- [INFO] artifact com.ontimize:ontimize-core: checking for updates from central [INFO] artifact com.ontimize:ontimize-core: checking for updates from imatia-local [INFO] artifact com.ontimize:ontimize-core: checking for updates from snapshots [INFO] User cache: /var/lib/jenkins/.sonar/cache [INFO] SonarQube version: null [INFO] ----------------------------------

SonarQube 5.3 Background Task Fails with No Log in Dashboard

扶醉桌前 提交于 2019-12-19 02:55:10
问题 I know this is similar to sonarqube 5.2 background tasks sometimes fail with no log - however I cannot comment (due to lack of reputation points) to add some more information, so tried adding this post as an answer, but had it deleted by the moderators... I was having a problem with SonarQube 5.2 , and now 5.3 following an upgrade yesterday. I have tried upping the logging to TRACE on the server, and enabling sonar.verbose=true on the project itself. However, there is no extra information in

PacketTooBigException when running a sonar analysis

廉价感情. 提交于 2019-12-18 21:15:50
问题 When I try and run a sonar analysis I get this exception com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1807198 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable. Where on the sonar server should I set this value? I'm using Sonar 3.4.1 and MySQL 5.x 回答1: Locate the config file my.cnf (If your MySQL is running in Windows, locate my.ini ) Add this to the config file [mysqld] max_allowed_packet=256M Then, restart mysql For Linux

How to resolve 'Define and throw a dedicated exception instead of using a generic one.'

試著忘記壹切 提交于 2019-12-18 20:16:05
问题 I need to throw RuntimeException when length of two lists is not equal. We are using SonarQube tool for code review purpose. Here is the code: if (objctArray.length != columnArray.length) { throw new RuntimeException(String.format("objctArray and columnArray length is not same. objctArray length = %d, columnArray length = %d", objctArray.length, columnArray.length)); } Now, SonarQube raises issue that Define and throw a dedicated exception instead of using a generic one. at throw new

How do I make Hudson/Jenkins fail if Sonar thresholds are breached?

僤鯓⒐⒋嵵緔 提交于 2019-12-18 19:09:01
问题 I am using maven to build my java app, Jenkins for CI and Sonar for metrics. Currently I have a build job that creates the sonar report. (Triggered via a post-build step in Jenkins.) I would like to set this up to fail the build if certain thresholds are met - i.e. any major or blocker violations or Complexity more than 1.7. Any guidance would be appreciated! - L 回答1: Install the build breaker plugin. Fails your build if the code breaches any of the alert thresholds you specify on the project

How to persist configuration & analytics across container invocations in Sonarqube docker image

筅森魡賤 提交于 2019-12-18 16:54:30
问题 Sonarqube official docker image, is not persisting any configuration changes like: creating users, changing root password or even installing new plugins . Once the container is restarted, all the configuration changes disappear and the installed plugins are lost. Even the projects' keys and their previous QA analytics data is unavailable after a restart. How can we persist the data when using Sonarqube's official docker image? 回答1: Sonarqube image comes with a temporary h2 database engine

How to persist configuration & analytics across container invocations in Sonarqube docker image

依然范特西╮ 提交于 2019-12-18 16:54:16
问题 Sonarqube official docker image, is not persisting any configuration changes like: creating users, changing root password or even installing new plugins . Once the container is restarted, all the configuration changes disappear and the installed plugins are lost. Even the projects' keys and their previous QA analytics data is unavailable after a restart. How can we persist the data when using Sonarqube's official docker image? 回答1: Sonarqube image comes with a temporary h2 database engine

All quality profiles have no rules when SonarQube is upgraded to 5.4

六月ゝ 毕业季﹏ 提交于 2019-12-18 16:10:56
问题 We are currently running a production server at version 5.1.2 which we are planning to upgrade. Tests have shown that upgrading to 5.3 works as expected. However, upgrading from 5.1.2 -> 5.4 or 5.1.2 -> 5.3 -> 5.4 results in all quality profiles from the 5.1.2 instance becoming empty - no rules assigned at all. Worse, backing up the rules and attempting to restore them fails silently. Has anyone else experienced this? Is there a work-around? Thanks in advance. 回答1: The update instructions in