dimitrovvlado / proto-lint-maven-plugin

Maven linter plug-in for .proto files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

proto-lint-maven-plugin

Travis CI codecov

A maven linter plugin for gRPC .proto files.

This plug-in will check your project's .proto files for violations of Google's Protocol Buffer Style Guide. By using this plug-in you are able to retrieve those compilation errors which are not reported by the protobuf compiler:

  • Message and field names
  • Enums
  • Service and RPC names

Usage

Add a plugin declaration to your project's pom file as follows:

<project>
  ...
  <build>
    <plugins>
      <plugin>
        <groupId>io.github.dimitrovvlado</groupId>
        <artifactId>proto-lint-maven-plugin</artifactId>
        <version>1.0.2</version>
        <executions>
          <execution>
            <goals>
              <goal>lint</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  ...
</project>

The plugin will search recursively for .proto files in the source folder of the module.

Additionally you can configure the path to your .proto files as follows:

<configuration>
  <protoFiles>
    <protoFile>sample.proto</protoFile>
  </protoFiles>
</configuration>

or to a folder:

<configuration>
  <protoDirectory>src/main/proto/</protoDirectory>
</configuration>

Dependencies

This plug-in depends on the following third-party libraries:

  • com.squareup.wire:wire-schema
  • com.squareup.okio:okio
  • com.google.guava:guava

About

Maven linter plug-in for .proto files

License:Apache License 2.0


Languages

Language:Java 97.7%Language:Shell 2.1%Language:Groovy 0.3%