A pluggable linter and fixer to enforce Protocol Buffer style and conventions.
protolint is a pluggable linting and fixing utility for Protocol Buffer files (.proto). It enforces style conventions and best practices by analyzing .proto files without requiring compilation, making it fast and easy to integrate. The tool helps teams maintain consistent, readable, and standards-compliant Protocol Buffer definitions across projects.
Developers and teams working with Protocol Buffers (proto2/proto3) who need to enforce coding standards, improve code quality, and automate style checks in their .proto files.
protolint offers a fast, dedicated linter that aligns exactly with the official Protocol Buffer style guide, includes an auto-fixer, and supports plugins for custom rules. Its extensive integration options (editors, CI/CD, protoc) make it a versatile choice for enforcing consistency in Protocol Buffer projects.
A pluggable linter and fixer to enforce Protocol Buffer style and conventions.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows loading custom lint rules via plugins, enabling extensibility for project-specific conventions. The README includes a complete sample project for creating custom rules.
Rules correspond exactly to Google's Protocol Buffer style guide, with many violations auto-fixable using the -fix flag. Examples like ENUM_NAMES_UPPER_CAMEL_CASE are automatically corrected.
Supports editors (VS Code, Vim, IntelliJ), CI/CD systems, GitHub Actions, pre-commit hooks, and protoc plugin. This makes it versatile for embedding into existing workflows.
Parses .proto files without compilation, making it faster than compiler-based linters. The README emphasizes speed as a core philosophy.
Auto-disable feature inserts disable comments to manage violations without breaking compatibility, useful for gradual enforcement. Configured with -auto_disable=next or this.
Focuses on style and basic syntax, missing deeper issues like type mismatches or logical errors since it doesn't compile .proto files. This limits its effectiveness for full protocol validation.
Not all rules support auto-fix or auto-disable, such as PROTO3_GROUPS_AVOID, requiring manual intervention. The rules table shows underscores for fixable and *1 markers for no auto-disable.
Setting up custom rules or advanced configurations requires Go knowledge for plugins and YAML familiarity. The plugin example involves Go development, adding complexity.
Relies on go-protoparser, which may have bugs or limitations not present in the official protobuf compiler, potentially affecting accuracy for edge cases.