sonarqube

Error during SonarQube Scanner execution with sonar python enabled

爱⌒轻易说出口 提交于 2019-12-11 17:05:11
问题 I am a very new sonarqube user, experimenting with my python project. I have installed docker Sonarqube image which has Sonarpython plugin installed. I installed the linux base sonar scanner. Using these instructions, I configured the scanner. However when running it, I run into: 11:28:33.486 INFO: Configured Java source version (sonar.java.source): none 11:28:33.496 INFO: JavaClasspath initialization 11:28:33.512 INFO: ------------------------------------------------------------------------

Trying to Exclude Unit Tests from Code Coverage

牧云@^-^@ 提交于 2019-12-11 17:02:27
问题 I am trying to exclude the unit test projects/folders from the code coverage analysis since it is inflating the code coverage percentage. I have different layers/projects and unit test projects for each of those. As shown below. Solution DataAccess Business Service Model Test.DataAccess Test.Business Test.Service Test.Model How do I exclude any folder/project that has "Test.*" in its name/path? I want to exclude everything within those folders. I've tried the patterns below (and many others):

Why : A PMD rule without 'ref' attribute can't be imported. see 'null'?

风流意气都作罢 提交于 2019-12-11 16:52:36
问题 I'm trying to create a quality profile in Sonar 3.0.1 and to specify my pmd configuration file. But when I submit it, I've got the following error : A PMD rule without 'ref' attribute can't be imported. see 'null' Here the content of my extension file (sample taken at Sonar site) : <rules> <rule key="AvoidIfWithoutBrace"> <name>Avoid if without using brace</name> <configKey>rulesets/extensions.xml/AvoidIfWithoutBrace</configKey> <category name="Usability" /> <description>éviter les if sans

Pmd violations with sonar

北城余情 提交于 2019-12-11 16:49:17
问题 I just need a clarification about PMD with Sonar.Can we reuse Pmd reportwhich is already produced by ant..Else sonar will dynamically produce its own violation using PMD. Please help me out...For past two days iam stucked up with this. Thanks!!! 回答1: No it's not possible to import PMD nor Checkstyle reports. This is not the philosophy of Sonar. Nothing guarantees that PMD has been executed with the configuration (Quality Profile) declared in sonar. It would lead to inconsistent results.

Analyze iOS/Swift mobile apps with SonarQube

假如想象 提交于 2019-12-11 16:48:12
问题 Well, in my company we develop some projects with some languages. Now we are migrating all from SVN to GitLab and we started to use Jenkins and SonarQube with Ubuntu Server for CI. All is fine with Java projects (everything runs with linux slaves), but now we wanna use SonarQube to analyze app with Objective-C and Swift. To analyze the projects (mobile apps) we gonna buy the developer edition to use Swift and Objective-C plugins (open source plugins are discarded). So, my question is, we need

Sonar complains about assertThat with nullValue

六月ゝ 毕业季﹏ 提交于 2019-12-11 16:47:49
问题 Having the test case using JUnit 4.12: import static org.hamcrest.CoreMatchers.nullValue; import static org.junit.Assert.assertThat; //... @Test public void testShouldReturnNull() { final Long result = getIdFunction.apply(null); assertThat(result, is(nullValue())); } Sonar says: Add at least one assertion to this test case. Why does Sonar says that there are no assertions and how it can be fixed? SonarQube v6.7 回答1: I've just found a solution for this case: Here should be used assertThat

How to force code coverage to Zero?

元气小坏坏 提交于 2019-12-11 16:38:32
问题 I have several java projects with no unit test cases. When I try to analyse these projects using SonarQube I am unable to get unit test code coverage because it doesn't have any test cases. As per my research I saw that I can force it to show it as zero if there are no unit test cases. The official Jacoco Java documentation mentions sonar.jacoco.reportMissing.force.zero=true . My SonarQube analysis will be done using maven builds and SonarQube 5.6.6 and sonar-java 4.11.0.10660. How can I set

Cannot Display measure_filter_list in Sonar 4.3.2 after Schema Migraiton

霸气de小男生 提交于 2019-12-11 16:29:21
问题 We are using Sonarqube 4.3.2. We migrated the Oracle 11.2 Schema to a different Oracle DB server. After migration when logged in as admin, we get the following: Error occurred while trying to display the widget "measure_filter_list I tried changing the database entry to remove sort=links as suggested here. However that does not help. Can you please suggest what can be done? We do not have an immediate plan to upgrade. Any help appreciated. Below is error log. 2015.07.02 09:54:04 ERROR web

SonarQube: Fail to get bootstrap index from server: Status returned by url [http://localhost:9000/batch/index] is not valid: [404]

大憨熊 提交于 2019-12-11 15:59:47
问题 I'm new to sonarqube and trying to analyze a maven project with it. I'm using the following command to do start the analysis mvn sonar:sonar -Dsonar.host.url=http://localhost:9000 -Dsonar.login=TOKEN_GENERATED But I'm getting 404 error [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building crystalviz 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] ---