Start Free
Latest | Analyzing source code | Pull request analysis | Introduction

Introduction to the pull request analysis

On this page

Pull request analysis is available starting in Developer Edition

A pull request analysis occurs when a pull request is opened and every time a change is pushed to the pull request branch. Analysis results only include issues that have been introduced by the pull request itself. A quality gate on the pull request uses these results to ensure that the code changes introduced are always clean.

The pull request analysis must be integrated into a CI pipeline. For more information, see Integration into your CI pipeline on the SonarQube analysis overview page.

Clean as You Code

The Quality Gate of your project is used for the pull request analyses. Only the Quality Gate’s conditions applying to new code metrics are used. 

In a pull request analysis, new code is defined as the code that has changed in the pull request branch compared to the target branch. Only issues on new code are reported.

Quality gate status report (pull request decoration)

The pull request analysis results and quality gate status can be reported directly to your DevOps platform’s interface. 

Incremental pull request analysis

To shorten the pull request analysis, different incremental analysis mechanisms are used.

Issue synchronization

SonarQube synchronizes issue attributes (status, assignee, change log, comments) between the pull request and the target branch. For more information, see the corresponding section in Issue management solution overview. Note that security hotspots are not synchronized.


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