# Project analysis setup

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

For an overview of the analysis process, see the [SonarQube analysis process](/sonarqube-server/discovering/analysis-overview/process-steps.md) page.

## Prerequisites and recommendations <a href="#prerequisites" id="prerequisites"></a>

<details>

<summary>SonarQube Server is integrated with your DevOps platform / CI tool</summary>

It is highly recommended that you integrate SonarQube Server with your DevOps platform or CI tool. See [DevOps platforms](/sonarqube-server/discovering/devops-platforms.md).

</details>

<details>

<summary>The SCM integration is properly set up</summary>

The SCM data used during the analysis will be automatically imported from Git and SVN. Other providers require additional plugins. We highly recommend using the full depth during the cloning of the code from the project repository.

{% hint style="warning" %}
A full Git clone is required. If a shallow clone is found, the blame information retrieval will be skipped and the analysis may fail.
{% endhint %}

For more information, see [SCM integration](/sonarqube-server/analyzing-source-code/scm-integration.md).

</details>

<details>

<summary>The SonarScanner is installed on the CI/CD host</summary>

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](/sonarqube-server/analyzing-source-code/scanners/scanner-environment/general-requirements.md).

For installation instructions, see the corresponding SonarScanner section:

* [SonarScanner for Maven](/sonarqube-server/analyzing-source-code/scanners/sonarscanner-for-maven.md)
* [SonarScanner for Gradle](/sonarqube-server/analyzing-source-code/scanners/sonarscanner-for-gradle.md)
* SonarScanner for .Net: [Installing the scanner](/sonarqube-server/analyzing-source-code/scanners/dotnet/installing.md)
* SonarScanner for NPM: [Installing the scanner](/sonarqube-server/analyzing-source-code/scanners/npm/installing.md)
* [SonarScanner for Python](/sonarqube-server/analyzing-source-code/scanners/sonarscanner-for-python.md)
* [SonarScanner CLI](/sonarqube-server/analyzing-source-code/scanners/sonarscanner.md)

</details>

## Creating your SonarQube Server project <a href="#creating-sq-project" id="creating-sq-project"></a>

Your project repository is represented in SonarQube Server by a project.

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

To create a project, see [Creating your project](/sonarqube-server/project-administration/creating-project.md).

## Integrating the SonarQube Server analysis into your CI or build pipeline <a href="#integrating-into-ci-or-build" id="integrating-into-ci-or-build"></a>

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

* Jenkins: [Adding analysis to a Jenkins job](/sonarqube-server/analyzing-source-code/ci-integration/jenkins-integration/add-analysis-to-job.md)
* GitHub Actions: [GitHub Actions](/sonarqube-server/analyzing-source-code/ci-integration/github-actions.md)
* GitLab CI/CD: [GitLab CI/CD](/sonarqube-server/analyzing-source-code/ci-integration/gitlab-ci-cd.md)
* Azure Pipelines: [Azure Pipelines](/sonarqube-server/analyzing-source-code/ci-integration/azure-pipelines.md)
* Bitbucket Pipelines: [Bitbucket Pipelines](/sonarqube-server/analyzing-source-code/ci-integration/bitbucket-pipelines.md)

To integrate the SonarQube Server analysis into your build pipeline, see the scanner invoking instructions in the corresponding section:

* [SonarScanner for Maven](/sonarqube-server/analyzing-source-code/scanners/sonarscanner-for-maven.md)
* [SonarScanner for Gradle](/sonarqube-server/analyzing-source-code/scanners/sonarscanner-for-gradle.md)
* SonarScanner for .NET: [Using the scanner](/sonarqube-server/analyzing-source-code/scanners/dotnet/using.md)
* SonarScanner for NPM: [Using the scanner](/sonarqube-server/analyzing-source-code/scanners/npm/using.md)
* [SonarScanner for Python](/sonarqube-server/analyzing-source-code/scanners/sonarscanner-for-python.md)
* [SonarScanner CLI](/sonarqube-server/analyzing-source-code/scanners/sonarscanner.md)

For general information about SonarQube Server integration with a CI or build pipeline, see [SonarQube analysis process](/sonarqube-server/discovering/analysis-overview/process-steps.md).

## Adjusting the analysis of your project <a href="#adjusting-analysis" id="adjusting-analysis"></a>

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 Server 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 [Configuration overview](/sonarqube-server/analyzing-source-code/analysis-parameters/configuration-overview.md).

You can:

* Include the code and test coverage in your analysis: see [Overview](/sonarqube-server/analyzing-source-code/test-coverage/overview.md).
* Adjust the analysis scope: see [Setting analysis scope](/sonarqube-server/project-administration/adjusting-analysis/setting-analysis-scope.md).
* Import issues generated by third-party analyzers: see the [External analyzer reports](/sonarqube-server/analyzing-source-code/importing-external-issues/external-analyzer-reports.md) section.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sonarsource.com/sonarqube-server/analyzing-source-code/overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
