Skip to main content
Buf offers linting and compatibility checks for Protobuf files. CodeRabbit runs Buf v1.73.0.

Files

Buf will run on files with the following extensions:
  • .proto

Configuration

boolean
default:true
Enable Buf
.coderabbit.yaml
Buf uses a YAML configuration file. CodeRabbit searches anywhere in the repository, preferring buf.yaml over buf.yml:
  • buf.yaml
  • buf.yml
If no config file is found, CodeRabbit will consider the following categories of strictness based on the profile selected:

Chill

  • MINIMAL

Assertive

  • BASIC
Both generated configurations exclude ENUM_VALUE_UPPER_SNAKE_CASE and use the repository root as the Protobuf import root. If imports cannot be resolved, check the project’s declared import roots and dependencies. A repository configuration supplies its own lint rules instead of these defaults. CodeRabbit also compares the exact base and head revisions using Buf’s built-in WIRE_JSON compatibility rules in both profiles. This check preserves supported v1 or v2 module locations and v2 exclusions from the repository configuration, but uses fixed compatibility rules rather than repository-defined breaking rules. It runs without network access, excludes imported files from compatibility findings, and disables symlinks. CodeRabbit never runs buf generate or repository generation commands. For supported Go (*.pb.go) and Python (*_pb2.py) generated bindings, CodeRabbit can also report a stale embedded descriptor when the binding matched the source at the base revision and another binding was updated to match the changed source in the same pull request.

When we skip Buf

CodeRabbit skips Buf linting when:
  • The pull request does not change any .proto files.
  • Buf is already running in GitHub Actions, GitLab CI, CircleCI, or Azure Pipelines. Compatibility checks can still run.
Compatibility checks require exact, distinct base and head commit revisions and a supported module layout that includes every changed .proto file. They cannot complete when the selected Buf configuration changes between those revisions, the checkout differs from the reviewed head, source files exceed the scan limits, or required dependencies cannot be resolved offline.