> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/project-analysis.md).

# Setting up project analysis

Setting up a project analysis in SonarQube Cloud includes defining a analysis scope, managing long-lived branches, learning about quality gates and profiles, setting your new code definition.

If you don’t use [Automatic analysis](/sonarqube-cloud/analyzing-source-code/automatic-analysis.md), you must configure a CI-based analysis with a SonarScanner before setting up a project analysis. If needed, see the [Overview of integrated CIs](/sonarqube-cloud/analyzing-source-code/ci-based-analysis/overview-of-integrated-cis.md) page to learn about CI integrations.

{% content-ref url="/pages/avY1WCeyku2eqR3HZyBS" %}
[Analysis scope](/sonarqube-cloud/managing-your-projects/project-analysis/setting-analysis-scope.md)
{% endcontent-ref %}

{% content-ref url="/pages/lS7XlPkTlgfeKE5wvlS3" %}
[Long-lived branch pattern](/sonarqube-cloud/managing-your-projects/project-analysis/long-lived-branch-pattern.md)
{% endcontent-ref %}

{% content-ref url="/pages/3FBgTEesmIXh0OH7cBNp" %}
[Quality gate](/sonarqube-cloud/managing-your-projects/project-analysis/changing-quality-gate.md)
{% endcontent-ref %}

{% content-ref url="/pages/BPVx9IHX96aZ0cML2o3P" %}
[Quality profile](/sonarqube-cloud/managing-your-projects/project-analysis/quality-profile-association.md)
{% endcontent-ref %}

{% content-ref url="/pages/yr5n59H9UAnKCizqnnQk" %}
[New code definition](/sonarqube-cloud/managing-your-projects/project-analysis/configuring-new-code-calculation.md)
{% endcontent-ref %}

## Related pages

* Set and adjust your [Analysis scope](/sonarqube-cloud/managing-your-projects/project-analysis/setting-analysis-scope.md). To get started with understanding your analysis scope, see the section's [Introduction](/sonarqube-cloud/managing-your-projects/project-analysis/setting-analysis-scope/introduction.md) page.
* Enrich you analysis results with test coverage, external analyzers, and branch analysis. See the [Concepts](/sonarqube-cloud/analyzing-source-code/concepts.md#enriching-your-analysis) page.
* Disable or enable [Automatic analysis](/sonarqube-cloud/analyzing-source-code/automatic-analysis.md).
* Define a [Long-lived branch pattern](/sonarqube-cloud/managing-your-projects/project-analysis/long-lived-branch-pattern.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sonarsource.com/sonarqube-cloud/managing-your-projects/project-analysis.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
