Hi Kostiantyn,

Internally at Google we do have a .proto file linter, but we have not open
sourced it. I believe it performs some of the checks you mentioned but not
all (for example, it does not complain about required fields). Would you be
interested in it if we were able to open source it? One thing to note is
that it is not currently very configurable and so to make it work for your
use case we might have to add some options so that it can be as strict as
you want it to be without necessarily being that strict for everyone.

Adam

On Wed, Oct 5, 2016 at 1:56 PM, Kostiantyn Shchepanovskyi <
schepanov...@gmail.com> wrote:

> Hello guys,
>
> I am searching for something like checkstyle
> <http://checkstyle.sourceforge.net/>for protobuf.
>
> I have a maven project with proto files, and I want to have following
> checks:
>
> - Indentation check. One of {4 spaces | 2 spaces | tab character} should
> be used for indentation.
> - Name checks. For message, enum, service, field, enum constant - check
> name using a regular expression.
> - Required fields check. Required field modifier should not be allowed.
> - Curly braces check. Opening brace should be on the same line with type
> declaration, closing brace should be on a new line.
> - Imports check. Imports should be sorted, public imports should be in a
> separate block (separated by an empty line).
> - Comments check. Only line comments (//) should be allowed.
>
> Is there any existing tool that can do these checks? I tried to find
> something, but I did not succeed.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to protobuf+unsubscr...@googlegroups.com.
> To post to this group, send email to protobuf@googlegroups.com.
> Visit this group at https://groups.google.com/group/protobuf.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to