Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SonarQube not apply analyzing to the root project

I need to make analyzing only root project, and ignore nested sub module, but it d

So I have this hierarchy:

ProjectMain
 -src
 -subProjectAngular
  settings.gradle

My configuration settings.gradle

  rootProject.name="ProjectMain" 
  include 'subProjectAngular'

I need to make analyzing only root project, and ignore nested sub module, but I got:

A multi-module project can't have source folders, so 'C:\Users\vagrant\develop-2\site\Source\Site\Vessels\src\main\java' won't be used for the analysis. If you want to analyse files of this folder, y
ou should create another sub-module and move them inside it.

Then I tried to add multi module configuration:

systemProp.sonar.projectKey=site
systemProp.sonar.projectName=vessels-test
systemProp.sonar.projectBaseDir=.
systemProp.sonar.sources=src

systemProp.sonar.modules=javamodule, angularmodule

systemProp.javamodule.sonar.projectName=vessels
systemProp.javamodule.sonar.sources=src
systemProp.javamodule.sonar.projectBaseDir=.
systemProp.javamodule.sonar.language=java

systemProp.angularmodule.sonar.projectName=angular
systemProp.angularmodule.sonar.projectBaseDir=.
systemProp.angularmodule

but got message at UI: no analysis has been performed

It's only works when I remove definishion of subproject from settings.gradle, and remove all submodule confguration

like image 217
Yura Heto Avatar asked Mar 02 '17 12:03

Yura Heto


People also ask

Does SonarQube only analysis Java code?

SonarQube is an open source quality management platform, designed to analyze and measure your code's technical quality. It is used to test code written in the main programming languages such as C/C++, JavaScript, Java, C#, PHP, and Python, and even a combination of several languages simultaneously.

What happens during analysis of SonarQube?

What happens during analysis? During analysis, data is requested from the server, the files provided to the analysis are analyzed, and the resulting data is sent back to the server at the end in the form of a report, which is then analyzed asynchronously server-side.

How do you stop the problem in SonarQube?

For most languages, SonarQube supports the use of the generic mechanism: //NOSONAR at the end of the line of the issue. This will suppress all issues - now and in the future - that might be raised on the line.


1 Answers

This configuration is not support yet in SonarQube.

But the good news is that this will change with SonarQube 6.4 (expect in early May 2017). See the following tickets:

  • SONAR-6724
  • SONARGRADL-5
like image 80
Fabrice - SonarSource Team Avatar answered Oct 02 '22 03:10

Fabrice - SonarSource Team