buf-plugin-field-camel-case

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

README

buf-plugin-field-camel-case

🐪

Usage

A plugin that implements the Bufplugin API.

Once you've installed the plugin, using go install github.com/cobbinma/buf-plugin-field-camel-case simply add a reference to it and its rules within your buf.yaml.

version: v2
lint:
  use:
    - PLUGIN_FIELD_CAMEL_CASE
plugins:
  - plugin: buf-plugin-field-camel-case

All configuration works as you'd expect: you can continue to configure use, except, ignore, ignore_only and use // buf:lint:ignore comment ignores, just as you would for the builtin rules.

Given the following file:

# foo.proto
syntax = "proto3";

package foo;

import "google/protobuf/timestamp.proto";

message Foo {
  google.protobuf.Timestamp snake_case = 1;
}

The following error will be returned from buf lint:

foo.proto:8:3:Field name snake_case should be camelCase, such as snakeCase. (buf-plugin-field-camel-case)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL