pblint is a command line tool to lint Protocol Buffers.
go get -u github.com/sonatard/pblint
pblint -i proto/ api/v1/*.proto
- File name must be
servicename_service.proto
. - Request type must be in rpc declared file.
- Response type must be in rpc declared file.
- Request type name must be
MethodNameRequest
. - Response type name must be
MethodNameResponse
. - HTTP rule must set.
- HTTP method use GET or POST.
- HTTP URL must use
/ServiceName/MethodName
. - HTTP POST method body must be
*
. - HTTP GET method body must not set.
- HTTP body must not use AdditionalBindings.
- Other Message must not be in
servicename_service.proto
.