# Project analysis setup

For an overview of the analysis process, see the [analysis-overview](https://docs.sonarsource.com/sonarqube-community-build/analyzing-source-code/analysis-overview "mention") 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-platform-integration](https://docs.sonarsource.com/sonarqube-community-build/devops-platform-integration "mention").

</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](https://docs.sonarsource.com/sonarqube-community-build/analyzing-source-code/scm-integration "mention").

</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](https://docs.sonarsource.com/sonarqube-community-build/analyzing-source-code/scanners/scanner-environment/general-requirements "mention").

For installation instructions, see the corresponding SonarScanner section: [sonarscanner-for-maven](https://docs.sonarsource.com/sonarqube-community-build/analyzing-source-code/scanners/sonarscanner-for-maven "mention"), [sonarscanner-for-gradle](https://docs.sonarsource.com/sonarqube-community-build/analyzing-source-code/scanners/sonarscanner-for-gradle "mention"), [installing](https://docs.sonarsource.com/sonarqube-community-build/analyzing-source-code/scanners/dotnet/installing "mention") (.NET), [installing](https://docs.sonarsource.com/sonarqube-community-build/analyzing-source-code/scanners/npm/installing "mention") (NPM), [sonarscanner-for-python](https://docs.sonarsource.com/sonarqube-community-build/analyzing-source-code/scanners/sonarscanner-for-python "mention"), or [sonarscanner](https://docs.sonarsource.com/sonarqube-community-build/analyzing-source-code/scanners/sonarscanner "mention").

</details>

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

Your project repository is represented in SonarQube Community Build by a project.

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

To create a project, see [importing-repo](https://docs.sonarsource.com/sonarqube-community-build/project-administration/creating-project/importing-repo "mention").

## Integrating the SonarQube Community Build 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 Community Build analysis into your CI pipeline, see the corresponding section:

* Jenkins: [add-analysis-to-job](https://docs.sonarsource.com/sonarqube-community-build/analyzing-source-code/ci-integration/jenkins-integration/add-analysis-to-job "mention")
* GitHub Actions: [adding-analysis-to-github-actions-workflow](https://docs.sonarsource.com/sonarqube-community-build/devops-platform-integration/github-integration/adding-analysis-to-github-actions-workflow "mention")
* GitLab CI/CD: [adding-analysis-to-gitlab-ci-cd](https://docs.sonarsource.com/sonarqube-community-build/devops-platform-integration/gitlab-integration/adding-analysis-to-gitlab-ci-cd "mention")
* Azure Pipelines: [introduction](https://docs.sonarsource.com/sonarqube-community-build/devops-platform-integration/azure-devops-integration/adding-analysis-to-pipeline/introduction "mention")
* Bitbucket Pipelines: [bitbucket-pipelines](https://docs.sonarsource.com/sonarqube-community-build/devops-platform-integration/bitbucket-integration/bitbucket-cloud-integration/bitbucket-pipelines "mention")

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

* [sonarscanner-for-maven](https://docs.sonarsource.com/sonarqube-community-build/analyzing-source-code/scanners/sonarscanner-for-maven "mention")
* [sonarscanner-for-gradle](https://docs.sonarsource.com/sonarqube-community-build/analyzing-source-code/scanners/sonarscanner-for-gradle "mention")
* SonarScanner for .NET: [using](https://docs.sonarsource.com/sonarqube-community-build/analyzing-source-code/scanners/dotnet/using "mention")
* SonarScanner for NPM:[using](https://docs.sonarsource.com/sonarqube-community-build/analyzing-source-code/scanners/npm/using "mention")
* [sonarscanner-for-python](https://docs.sonarsource.com/sonarqube-community-build/analyzing-source-code/scanners/sonarscanner-for-python "mention")
* [sonarscanner](https://docs.sonarsource.com/sonarqube-community-build/analyzing-source-code/scanners/sonarscanner "mention")

For general information about SonarQube Community Build integration with a CI or build pipeline, see [analysis-overview](https://docs.sonarsource.com/sonarqube-community-build/analyzing-source-code/analysis-overview "mention").

## 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 Community Build 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](https://docs.sonarsource.com/sonarqube-community-build/analyzing-source-code/analysis-parameters/configuration-overview "mention").

You can:

* Include the code and test coverage in your analysis: see [overview](https://docs.sonarsource.com/sonarqube-community-build/analyzing-source-code/test-coverage/overview "mention").
* Adjust the analysis scope: see [setting-analysis-scope](https://docs.sonarsource.com/sonarqube-community-build/project-administration/adjusting-analysis/setting-analysis-scope "mention").
* Import issues generated by third-party analyzers: see the [external-analyzer-reports](https://docs.sonarsource.com/sonarqube-community-build/analyzing-source-code/importing-external-issues/external-analyzer-reports "mention") section.
