Code Review Tools Used in LibreOffice Development
LibreOffice relies on a robust suite of development tools to maintain code quality, automate testing, and manage contributions from hundreds of global developers. At the heart of this workflow is Gerrit Code Review, an open-source, web-based tool tightly integrated with Git and continuous integration (CI) systems. This article outlines the role of Gerrit in LibreOffice development and explores the supporting tools that complete their peer review and testing infrastructure.
Gerrit Code Review
Gerrit is the primary code review platform for the core LibreOffice repository. It acts as an intermediary between a developer’s local Git workspace and the central LibreOffice repository. When developers push commits, Gerrit stages them as proposed changes rather than applying them directly to the main branch.
Key aspects of how LibreOffice employs Gerrit include:
- Patch Set Management: Each revision of a change is tracked as a distinct “Patch Set,” allowing reviewers to compare incremental updates and ensure requested changes are implemented properly.
- Inline Commenting: Reviewers can leave comments on specific lines of code, ask questions, and suggest alterations directly in the web UI.
- Scoring and Approvals: LibreOffice uses Gerrit’s voting mechanism (such as Code-Review +1/-1 or +2 to approve). Only authorized committers can grant the final approval (+2) to merge the change into the main codebase.
Jenkins for Continuous Integration
Gerrit in LibreOffice is integrated with Jenkins, an automation server that executes automated builds and unit tests across multiple platforms (Linux, macOS, and Windows) for every submitted patch set.
- Automated Verification: Jenkins tests each incoming patch set before human reviewers invest time in a detailed review.
- Verified Votes: If a build breaks or unit tests fail, Jenkins assigns a “Verified -1” score to the change in Gerrit, blocking it from being merged until the developer fixes the issue.
Bugzilla Integration
While Bugzilla is primarily an issue tracker rather than a dedicated
review tool, it is integrated into the LibreOffice review pipeline.
Developers reference Bugzilla ticket numbers (e.g.,
tdf#12345) in their commit messages. Gerrit automatically
links these commits to the relevant Bugzilla issues, and when a review
is approved and merged, Bugzilla is updated automatically with the
commit reference and the status of the bug.
Tinderbox System
Complementing Gerrit and Jenkins is the LibreOffice Tinderbox infrastructure. Tinderboxes are dedicated build machines that continuously pull the latest integrated code from the main repository to compile and run the full test suite under various environments and configurations (such as different compiler versions or specialized optimization flags). This catches platform-specific regressions that quick pre-merge CI checks might miss.