Start Free
Latest | Analyzing source code | Project analysis setup

Project analysis setup overview

On this page

This page introduces briefly the prerequisites and the setup steps necessary for a project analysis. 

For an overview of the analysis process, see SonarQube analysis overview.

Prerequisites and recommendations

SonarQube is integrated with your DevOps platform / CI tool

It is highly recommended that you integrate SonarQube with your DevOps platform or CI tool. See:

The SonarScanner is installed on the CI/CD host

The SonarScanner must be installed on the CI/CD host. You must install the scanner that is most appropriate for your needs depending on your build system: Gradle, Maven, .NET, NPM, or Python. For other project types, use the SonarScanner CLI which requires more manual configuration. 

For installation requirements, see General requirements on scanner environment.

For installation instructions, see the corresponding SonarScanner section: Maven, Gradle, NET, NPM, Python, or CLI

Creating your SonarQube project

Your project repository is represented in SonarQube by a project.

You can create your SonarQube project in the SonarQube UI before starting the first project analysis. Or you can start your first project analysis to automatically create the SonarQube project on the server (SonarQube creates automatically a new project if the received project key does not exist in its database).

To create a project, see Creating and importing projects.

Integrating SonarQube analysis into your CI or build pipeline

To integrate the SonarQube analysis into your CI pipeline, see the corresponding section:

To integrate the SonarQube analysis into your build pipeline, see the scanner invoking instructions in the corresponding section:  Maven, Gradle, NET, NPM, Python, or CLI

For general information about SonarQube integration with a CI or build pipeline, see SonarQube analysis overview.

Adjusting the analysis of your project

The analysis performed by the SonarScanner is configured through analysis parameters. The following applies:

  • A few analysis parameters are mandatory. 
  • Many analysis parameters, such as those defining the analysis scope, have a default value and can be adjusted. 
  • Analysis parameters allow you to include the code and test coverage in your analysis, or to import issues generated by a third-party analyzer, etc.

SonarQube manages the analysis parameters through sonar properties (The sonar property key has the following syntax: sonar.<property>.).

You can configure the analysis parameters in different places. For more information, see Analysis parameters and the respective SonarScanner section: Maven, Gradle, NET, NPM, Python, or CLI

You can:


Was this page helpful?

© 2008-2024 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARLINT, SONARQUBE, SONARCLOUD, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License