cobbinma / protoc-gen-camel

πŸͺ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

protoc-gen-camel

A plug-in for Google's Protocol Buffers compiler to check camel case field name violations.

Installation

go install github.com/cobbinma/protoc-gen-camel@v0.0.1

Usage

❯ protoc --camel_out=. $(find . -name '*.proto')
example/camel.proto:Field name "one_two" should be camelCase, such as "oneTwo".
--camel_out: πŸͺ: 1 total

Configuration

ignore:
    - camel.Foo.one_two

generate a configuration file with all violations ignored

protoc --camel_out=generate=true:. $(find . -name '*.proto')

use the configuration file

protoc --camel_out=config=camel.yml:. $(find . -name '*.proto')

Buf

version: v1
plugins:
  - plugin: camel
    out: .
    strategy: all
    opt:
      - config=camel.yml

About

πŸͺ


Languages

Language:Go 100.0%