Repolode
yoheimuta

yoheimuta/protolint

A pluggable linter and auto-fixer that enforces Protocol Buffer style guide rules without requiring a protoc compiler.

Stars
697
Forks
65
Open issues
53
Last commit
15 days ago

What is it?

protolint lints and fixes .proto files for both proto2 and proto3. It parses the files directly without invoking the protobuf compiler, so checks run quickly and do not need a full compilation environment. Most official style guide rules are fixable with the -fix flag, and an auto-disable mode can insert suppression comments instead of making changes that would break API compatibility.

Rules can be turned off inline with protolint:disable comments, or configured through a .protolint.yaml file. Custom lint rules can be loaded as plugins. Output can be formatted for GitHub Actions, Azure DevOps, GitLab CI, JUnit, SARIF, SonarQube and other tools.

protolint can run as a standalone CLI, a protoc plugin, a pre-commit hook, a Go library, an npm or Python package, or an MCP server for AI clients.

Key features

  • 01Lints proto2 and proto3 files without requiring protoc.
  • 02Automatically fixes most official style guide violations with -fix.
  • 03Auto-disable mode inserts suppression comments to keep API compatibility.
  • 04Supports inline disable comments and .protolint.yaml configuration.
  • 05Loads custom rules through a plugin architecture.
  • 06Provides reporters for JUnit, SARIF, SonarQube, JSON and CI systems.

Use cases

  • Enforcing consistent naming and indentation across a team's protobuf schemas.
  • Running style checks in CI pipelines or pre-commit hooks before merging.
  • Linting protobuf files in editors such as VS Code, IntelliJ or Vim.
  • Adding project-specific lint rules for an internal API convention.

Topics

FAQ

What is protolint?
A pluggable linter and auto-fixer that enforces Protocol Buffer style guide rules without requiring a protoc compiler. protolint lints and fixes .proto files for both proto2 and proto3. It parses the files directly without invoking the protobuf compiler, so checks run quickly and do not need a full compilation environment. Most official style guide rules are fixable with the -fix flag, and an auto-disable mode can insert suppression comments instead of making changes that would break API compatibility.
Is protolint free to use? What license does it have?
protolint is open source under the MIT license. Check the license terms before using it in commercial products.
Is protolint still maintained?
Actively maintained. The last commit to protolint was on Oct 7, 2026.
What can I use protolint for?
Enforcing consistent naming and indentation across a team's protobuf schemas. Running style checks in CI pipelines or pre-commit hooks before merging. Linting protobuf files in editors such as VS Code, IntelliJ or Vim. Adding project-specific lint rules for an internal API convention.
Where can I get protolint?
The source code and installation instructions are on GitHub: https://github.com/yoheimuta/protolint

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects