sonarqube

Disable rule in sonar

浪子不回头ぞ 提交于 2019-12-18 03:51:06
问题 I want to disable a rule from Sonar so it doesn't show the results in the web page. In my case I want to hide (or not capture) the results about trailing comments. Is it posible to configure it somewhere? Thanks. 回答1: You have to remove this rule in the quality profile that you are using to analyse your project. Please refer to the documentation that describes all this: Quality Profiles in Sonar. 回答2: The right way to do is to put something like this on sonar-project.properties file per

Error in SonarQube when launching svn blame

与世无争的帅哥 提交于 2019-12-17 18:40:04
问题 I recently upgraded my SonarQube server from 4.5.2 to 5.0.1, then to 5.1 (see edit below). Suddenly, the analysis of a multi-module Maven project failed with the following error : [INFO] [12:02:05.045] Sensor SCM Sensor... [INFO] [12:02:05.169] SCM provider for this project is: svn [INFO] [12:02:05.169] Retrieve SCM blame information... [INFO] [12:02:05.185] 650 files to be analyzed [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO]

How can I use git as the scm provider in sonarqube 5.0 ( using sonar-runner )

寵の児 提交于 2019-12-17 16:34:33
问题 I following the official support of sonarqub http://docs.sonarqube.org/display/SONAR/SCM+support and I got the error at above. did I miss something need to config, or configure wrong 08:46:33.723 INFO - Sensor SCM Sensor... 08:46:33.897 INFO - SCM provider for this project is: git 08:46:33.898 INFO - Retrieve SCM blame information... 08:46:33.915 INFO - 632 files to be analyzed 08:46:34.377 INFO - Author: PersonIdent[Not Committed Yet, , Tue Feb 3 08:46:34 2015 +0000] 08:46:34.379 INFO -

What is the correct way to configure an Android project with submodules for use with the sonarqube gradle plugin?

空扰寡人 提交于 2019-12-17 14:52:33
问题 What is the correct way to configure an Android project with submodules for use with the sonarqube gradle plugin? Google has not been my friend, but I may have missed something basic. (I search for sonarqube issues related to the android build directories and submodules. No useful results.) At a very high level, I am working with an Android project with the following structure. git_repository |----- android_project |--- app |--- SDK |- api The git_repository contains the README.md and other

Docker学习四-配置SonarQube

房东的猫 提交于 2019-12-17 14:45:09
1、拉取数据库 SonarQube默认使用的PostgreSQL数据库,PostgreSQL也是一个关系型数据库。 docker pull postgres 2、拉取SonarQube docker pull sonarqube 3、启动PostgreSQL   在docker容器中配置启动PostgreSQL,创建一个数据库db_sonar,并创建用户、设置密码: docker run --name db_sonar -e POSTGRES_USER=sonar -e POSTGRES_PASSWORD=sonar -d postgres 4、启动SonarQube   在docker中配置名为sonarqube_test的sonarqube对象,启动连接名为db_sonar的PostgreSQL对象,并配置进出端口都为9000 docker run --name sonarqube_test --link db_sonar -e SONARQUBE_JDBC_URL=jdbc:postgresql://db_sonar:5432/sonar -p 9000:9000 -d sonarqube 5、登录查看 这里我的docker的IP地址是http://172.17.0.3,端口之前配的是9000,如下打开可以登录,首次登录账号是admin/admin 5、使用sonar

Setup to detect duplicate C# code

浪尽此生 提交于 2019-12-14 04:21:28
问题 I fail to detect duplicate code in sonarq I've Sonarqube 5.1 up and running and following plugins installed: C# [csharp] 4.0 Issue Assign [issueassign] 1.6 Issues Density [issuesdensity] 1.0 Java [java] 3.0 JavaScript [javascript] 2.5 German Pack [l10nde] 1.1 Motion Chart [motionchart] 1.7 Python [python] 1.5 Redmine [redmine] 0.2 ReSharper [resharper] 1.0 Git [scmgit] 1.0 Mercurial [scmmercurial] 1.1 Scm Stats [scmstats] 0.3.1 SVN [scmsvn] 1.0 TFS [scmtfs] 1.0 StyleCop [stylecop] 1.1

Launching Sonar Scanner from a gitlab docker runner

烂漫一生 提交于 2019-12-14 04:19:18
问题 I have a CI workflow that integrates a linting job and then a code quality job. My Linting job is a docker runner launching my eslint script from the application code. Then my code quality job is supposed to start a sonar scanner docker instance, check my code and send the reports back to my sonarqube instance. The problem is mainly with the fact that i can't launch correctly the sonar scanner with either solutions which are : Sonar Scanner Docker https://github.com/newtmitch/docker-sonar

sonarqube url connection refused for Quality Gate using Jenkins Pipeline

旧街凉风 提交于 2019-12-14 04:03:07
问题 After a good 2 days trying to get Jenkins pipelines to work I've hit an issue in the Quality Gate section I'm unable to resolve. Both Jenkins and SonarQube are on the same server in our network (say 192.168.0.6) Sonarqube can be accessed from this server using localhost:9000 and on my dev computer I've added sonar.ecl to the hosts file pointing to 192.168.0.6 Jenkins is accessed with 192.168.0.6:8080 on my dev box and localhost:8080 from the netwrok server. Both servers are running and can be

Coverage per test - jacoco, tomcat and sonar

隐身守侯 提交于 2019-12-14 03:54:23
问题 I have looked around the net with lot of information regarding the topic scattered but not one that fits my need. I plan to measure the coverage of system test cases. Our system test cases run in a clustered environment supported by Tomcat server. So in different JVM. There are multiple instance of Tomcat running where system test cases run, hence I get multiple jacoco bump files at each Tomcat. I am attaching jacoco agent jar to tomcat startup as VM argument: -javaagent:org.jacoco.agent

Proper way for getting annotations of Java-Methods in custom Sonar rules

久未见 提交于 2019-12-14 03:49:38
问题 I try to write a custom Sonar-rule (Java) and struggle with the proper way for getting annotation of invoked Java methods. This rule should detect illegal access to methods and fields marked as @VisibleForTesting . Accesing such elements from production code is illegal, but access from the same class is legal. My first approach is to implement BaseTreeVisitor.visitMethodInvocation(MethodInvocationTree) and use the metadata of the belonging symbol: get annotations: methodInvocationSymbol