sonarqube

sonar quality profile rule export with descrption

自作多情 提交于 2019-12-10 20:57:16
问题 How to download a sonar quality profile along with description. /profiles/export?language=java&name=xyz_profile Gives me xml dump with repositoryKey, key, priority elements of each rule. What shud i do to get description/rule descriptiin text? Pls help. 回答1: You should get what you want with the /api/rules web service and with help of the "profile" parameter : http://docs.codehaus.org/pages/viewpage.action?pageId=229743284 来源: https://stackoverflow.com/questions/24324490/sonar-quality-profile

sonarqube 4.2 and lombok

旧巷老猫 提交于 2019-12-10 19:33:26
问题 After upgrading SonarQube from 4.0 to 4.2, I got a bunch of 'Unused private fields should be removed' errors from the classes with Lombok annotations. I have @SuppressWarnings("PMD.UnusedPrivateField") declared at the beginning of all those classes. It worked fine when I was using SonarQube 3.7 and 4.0. I use mvn sonar:sonar to generate the SonarQube report. And this shows how my class look like: @Data @SuppressWarnings("PMD.UnusedPrivateField") public class MyClass { private String field; }

sonarqube 5.2 background tasks sometimes fail with no log

故事扮演 提交于 2019-12-10 19:22:42
问题 It seems that over half of the time I try to execute analysis using Sonar Runner 2.4 on several different projects that the analysis completes successfully but the publish (via the background task) to SonarQube fails. There is no log that I can find with relevant information on the SonarQube server for the failed tasks - at least I can't find any. I am new to SonarQube. The SonarQube 5.2 server is on Windows Server 2012 R2 using SQL Server 2012(SP1) database. 回答1: The answer is the solution

Gallio error : MSTest executable was not found

风流意气都作罢 提交于 2019-12-10 19:16:54
问题 I've got an annoying issue with Gallio when I try to analyse my VS2012 C# solution with my sonar-runner. When Gallio try to launch my unit test I can find this issue in the logs : [error] Assembly XXXX Cannot run tests because MSTest executable was not found I've already tried some propositions of solution exposed here and here (I have installed Agents for VS 2012 and I have added a registry key with the path of my VS2012 installation) but nothing seems to work. Thank you by advance for your

How to enforce the correct behavior for the squid:S1161 rule: “@Override” annotation should be used on any method

匆匆过客 提交于 2019-12-10 18:38:10
问题 I develop a Java library which is intended for applications based on JDK5 . Tools used to build applications require JDK7 or bigger. I use version 8 update 45: java version "1.8.0_45" Java(TM) SE Runtime Environment (build 1.8.0_45-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode) After the analysis I received a lot of False Positives on methods that are implementing interface specification, e.g: public interface FileScanner { Collection<File> getFiles(File directory,

SonarQube: How to apply multiple quality profiles to one project?

ⅰ亾dé卋堺 提交于 2019-12-10 17:35:44
问题 I would like to use SonarQube 6.3.1 to analyze the Java and Kotlin code of an Android project. Therefore, I installed the Android Lint plugin besides the preinstalled SonarJava aka. Sonar way plugin. Both show up in the Java language dropdown in the Administration section of the project as shown in the screenshot. How can I apply multiple profiles at the same time? Where can I find other profiles suitable for Java/Kotlin/Android projects? Related posts Sonarqube: use multiple custom quality

SonarQube 4.4 not displaying cobertura unit tests or code coverage for grails 2.4.3 with spock tests

China☆狼群 提交于 2019-12-10 17:12:06
问题 I have SonarQube 4.4 installed on my machine. I am trying to generate metrics for a grails (2.4.3) project that has tests written in Spock framework. However, sonar does not show unit tests results or unit tests coverage. I verified that cobertura coverage.xml gets generated in the path provided below target/test-reports/cobertura/coverage.xml And I have sonar.groovy.cobertura.reportPath property in my pom.xml mapped to the above path. Running mvn sonar:sonar (maven version 3.2.3) on this

SonarQube rules getting disabled on startup

醉酒当歌 提交于 2019-12-10 16:37:56
问题 I initially setup a Sonar server on my development machine but later created a server on the official Linux machine, with the intent to stop using the dev one. During this transition i may have had both servers run at the same time (pointing to the same Sonar database). Now i am seeing some strange behavior. The local server comes up fine and i am able to run Sonar builds on it. However when i start the Linux server, it fails to load any rules, i see the following in the startup logs, and the

Possible to analyse SQL queries in Sonar?

╄→гoц情女王★ 提交于 2019-12-10 16:32:02
问题 I am using Sonar to analyse our Java code in a very large project. We mostly use Hibernate, but there are also a lot of plain SQL queries in our code. Is it possible to analyse those SQL queries by Sonar? I noticed there is a plugin for at least something similar, but I am unsure whether it fits my needs here. Some of our queries cause headaches, so it would be convenient if Sonar could notify of SQL anti-patterns. 回答1: There is a commercial PL/SQL plugin, but its designed to analyse Oracle

SonarQube 5.3: IllegalArgumentException: There's no changeset on line 1352

吃可爱长大的小学妹 提交于 2019-12-10 16:21:49
问题 I try to migrate from 5.1 to 5.3 version of SonarQube. SonarQube plugins: Cobertura 1.6.3 (cobertura) C# 4.4 (csharp) Java 3.9 (java) XML 1.4 (xml) Git 1.0 (scmgit) SVN 1.2 (scmsvn) JavaScript 2.10 (javascript) My project use Java, XML, JavaScript and jaCoCo code coverage. The client side analysis works fine, but I have a stack-trace in logs during the server-side integration: (end of logs) 2016.02.04 10:45:17 INFO [o.s.s.c.s.ComputationStepExecutor] Log scanner context | time=11ms 2016.02.04