sonarqube

Configure SonarQube on Jenkins

眉间皱痕 提交于 2020-01-06 06:42:14
问题 I have SonarQube and Jenkins dockerized(They're running on different containers); sonar is running on localhost:9000 and Jenkins is running on localhost:8080. I configured the Sonar credentials(with acces Token) on Jenkins, but i when run SonarScanner I'm getting the following error by SonarScaner on Jenkins: ERROR: SonarQube server [http://localhost:9000] can not be reached INFO: ---------------------------------------------------------------- INFO: EXECUTION FAILURE INFO: ------------------

Access SonarQube API with FetchAPI doesn't return any result

烂漫一生 提交于 2020-01-06 05:03:45
问题 I am trying to access SonarQube API through Fetch but it doesn't seem to be responding with any results. It just resolves with an opaque token. Let me share what I have done so far: fetch("http://localhost:9000/api/issues/search?pageSize=500&componentKeys=bactch_analysis_key",{ mode:'no-cors' }) // Call the fetch function passing the url of the API as a parameter .then( res => res.json() ) .then(data => { console.log(data); }) .catch(err => { console.log(err); }); I am setting the mode as no

What does it mean and how to fix SonarQube Java issue “Cycles between packages should be removed” (squid:CycleBetweenPackages)

旧时模样 提交于 2020-01-06 02:56:26
问题 Cycles exist between packages when there are dependencies of using or importing kind between classes in these packages. Consider the following example. Let there be 4 classes: Truck and interface Car in org.example.car package and Navigation and CPU in package org.example.part . In packages org.example.car and org.example.part we have use relations between classes Truck --> Car and classes Navigation --> CPU . Let's assume that the class Truck use Navigation class so we have the relationship

SonarQube won't refresh after deleted closed issues?

↘锁芯ラ 提交于 2020-01-06 02:25:09
问题 After configed "Delete closed issues after" and "Keep only one snapshot a day after" to 1 under "Settings > General Settings > General > Database Cleaner", and rerun analyze. The numbers under Issues are not correctly. Is there a way to refresh or config something to make sure the numbers are correct? Thanks! Here is the example. There are 16 issues in Unresolved. I checked all issues in the detail window, but only got 9 issues. Click me to see the screenshots 回答1: Okay, someone given me a

sonarRunner java.lang.OutOfMemoryError: PermGen space

Deadly 提交于 2020-01-06 01:00:06
问题 Environment: 1. Linux 2. Gradle 1.6/7 3. Language - Java gradle clean build jacocoTestReport - working fine. Recently followed the documentation provided by SonarQube installation at: http://docs.sonarqube.org/display/SONAR/Running+SonarQube+as+a+Service+on+Linux (sonar start, sonar status, sonar stop etc)...commands will work at this point. Changed gradle build script acc. to Gradle SonarRunner help page at: http://www.gradle.org/docs/current/userguide/sonar_runner_plugin.html While running

How do I stop sonar running tests?

江枫思渺然 提交于 2020-01-05 12:17:08
问题 I'm looking at using Sonar to reduced the number of plugins I've had to install in Jenkins to get some decent code analysis (and sonar seems to do more and present it better). However when I kick of the sonar job the JUnit / Concordion tests are executed. I don't want these tests run as Jenkins is already executing the tests. How do I stop the tests executing and just perform code analysis? I've installed sonar 3.7.3 and executing using the Gradle sonar-runner plugin and specifying the

Gather statistics for shared project

為{幸葍}努か 提交于 2020-01-05 11:20:13
问题 I have a C# solution with 3 projects. App.Console\App.Console.csproj App.Web\App.Web.csproj App.Shared\App.Shared.csproj Both App.Console and App.Web reference App.Shared . Currently, I build each project separately as they have slightly different MSBuild arguments. My current build process is as follows MSBuild.SonarQube.Runner.exe begin /k:"MyApp" /n:"My App" /v:"1.0" msbuild.exe msbuild App.Console\App.Console.csproj /t:'Rebuild' /p:Configuration=Release /p:OutDir=C:\Out\Console msbuild

Gather statistics for shared project

孤街浪徒 提交于 2020-01-05 11:20:12
问题 I have a C# solution with 3 projects. App.Console\App.Console.csproj App.Web\App.Web.csproj App.Shared\App.Shared.csproj Both App.Console and App.Web reference App.Shared . Currently, I build each project separately as they have slightly different MSBuild arguments. My current build process is as follows MSBuild.SonarQube.Runner.exe begin /k:"MyApp" /n:"My App" /v:"1.0" msbuild.exe msbuild App.Console\App.Console.csproj /t:'Rebuild' /p:Configuration=Release /p:OutDir=C:\Out\Console msbuild

Sonarqube - Why does java generated lines of code not get populated?

余生长醉 提交于 2020-01-05 09:24:11
问题 I am learning to use Sonarqube 4.3.2 for my Maven based Java projects. I have things working pretty well, but cannot get the Generated Lines and Generated Lines of Code metrics to populate. I would love this metric to track how much code out of the total a vendor actually has to manually code vs. generated code we provide via code generation. It would also help to see the various issues/statistics in general broken out by generated code vs. manual code. At first I thought perhaps Sonarqube

Generic test plugin ignores file

安稳与你 提交于 2020-01-05 09:07:51
问题 I try to use the generic test plugin. I have the unittest.xml file with an absolute path <file path="/Users/emerson/dev/sonar/project/workspace/components/triage/src/assets/test/unit/tests/controllers/controller.coffee"> the coffee script got compiled into js and unit tests were executed with the unittest.xml as result. When I add this to my sonar build via the sonar.genericcoverage.unitTestReportPaths , it does recognise the unittest.xml, but does nothing. The log says [sonar:sonar] 14:32:55