/pblint

pblint is a command line tool to lint Protocol Buffers.

Primary LanguageGo

pblint

pblint is a command line tool to lint Protocol Buffers.

Install

go get -u github.com/sonatard/pblint

Usage

pblint -i proto/ api/v1/*.proto

Lint Rules

  1. File name must be servicename_service.proto.
  2. Request type must be in rpc declared file.
  3. Response type must be in rpc declared file.
  4. Request type name must be MethodNameRequest.
  5. Response type name must be MethodNameResponse.
  6. HTTP rule must set.
  7. HTTP method use GET or POST.
  8. HTTP URL must use /ServiceName/MethodName.
  9. HTTP POST method body must be *.
  10. HTTP GET method body must not set.
  11. HTTP body must not use AdditionalBindings.
  12. Other Message must not be in servicename_service.proto.