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

Was this page helpful?

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.

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.

© 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