Skip to content

Code reviews

Documentation Index

Fetch the complete documentation index at: https://docs.sourcery.ai/llms.txt

Use this file to discover all available pages before exploring further.

Sourcery reviews your pull requests automatically, and every review posts the same things.

Every review posts:

  • A summary in the pull request description, covering the change’s purpose and risk.
  • A reviewer’s guide comment that maps the change set file by file and explains how to verify it.
  • Inline comments on the offending lines, with one-click apply on suggested fixes.
  • A status check called Sourcery review that reports the review state and can gate merges. No status check posts on GitLab merge requests.

Anatomy of a review walks through each one in detail.

Sourcery reviews a pull request as soon as it opens, and again when you push new commits. It reviews code in any language GitHub recognizes as a programming or markup language. A few cases skip the code review by default: draft pull requests, pull requests from dependency bots, packaging-only changes, and pull requests whose diff is over your plan’s size cap. You can change most of this in the review settings.

  • Configure code reviews sets what Sourcery posts, which pull requests it reviews, and per-repo overrides.
  • Review rules encode your team’s conventions as explicit checks.
  • Review rules states your conventions so Sourcery checks them every time.
  • Review language writes reviews in a language other than English.