Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive in camelCase naming violation for EnumValueOptions builtin #150

Open
midsbie opened this issue Nov 29, 2023 · 1 comment
Open

Comments

@midsbie
Copy link

midsbie commented Nov 29, 2023

I've encountered an issue with protolock's handling of EnumValueOptions in Protobuf, which seems to be a false positive and might represent bug(s) in the tool.

Specifically, protolock is flagging a camel case naming violation for EnumValueOptions, a built-in Protobuf symbol (documentation). Given that this is a standard, predefined Protobuf entity, it should not be subject to camel case violation checks. This false positive is misleading and contradicts Protobuf's standard naming conventions.


Example:

syntax = "proto3";

import "google/protobuf/descriptor.proto";

package foo.v1;

extend google.protobuf.EnumValueOptions {
  string display_name = 10001;
}

Produces:

CONFLICT: Message google.protobuf.EnumValueOptions is not CamelCase (wih an initial capital)

Only way I found of "resolving" the error was to add a skip hint:

// @protolock:skip
extend google.protobuf.EnumValueOptions {
  ...
@nilslice
Copy link
Owner

Thanks @miguel-guedes -- I have a short list of little maintenance issues I'll hopefully tackle over the holiday break. Will add this to the list!

I agree this may be a bit over-eager to report as an issue. If you wanted to contribute a fix for this, please let me know. Otherwise, I'll get to it asap :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants