https://github.com/cobbinma/protoc-gen-camel
🐪
https://github.com/cobbinma/protoc-gen-camel
camelcase protobuf protoc protoc-plugin protocol-buffer
Last synced: 3 months ago
JSON representation
🐪
- Host: GitHub
- URL: https://github.com/cobbinma/protoc-gen-camel
- Owner: cobbinma
- Created: 2023-03-31T07:40:13.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-06-21T17:40:25.000Z (almost 2 years ago)
- Last Synced: 2025-01-11T10:41:08.157Z (4 months ago)
- Topics: camelcase, protobuf, protoc, protoc-plugin, protocol-buffer
- Language: Go
- Homepage:
- Size: 32.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# protoc-gen-camel
A plug-in for Google's [Protocol Buffers](https://github.com/google/protobuf)
compiler to check camel case field name violations.## Installation
```sh
go install github.com/cobbinma/[email protected]
```## Usage
```sh
❯ protoc --camel_out=. $(find . -name '*.proto')
example/camel.proto:Field name "one_two" should be camelCase, such as "oneTwo".
--camel_out: 🐪: 1 total
```### Configuration
```yaml
ignore:
- camel.Foo.one_two
```generate a configuration file with all violations ignored
```sh
protoc --camel_out=generate=true:. $(find . -name '*.proto')
```use the configuration file
```sh
protoc --camel_out=config=camel.yml:. $(find . -name '*.proto')
```### Buf
```yml
version: v1
plugins:
- plugin: camel
out: .
strategy: all
opt:
- config=camel.yml
```