-
Notifications
You must be signed in to change notification settings - Fork 243
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
field name contains a number #2868
Comments
I noticed the commend in here: // We allow both effectively by not passing the option
//return stringutil.ToLowerSnakeCase(s, stringutil.SnakeCaseWithNewWordOnDigits()) would an option be introduced to enforce the rule defined in the style guide? |
Thanks for the feedback. We don't want to modify our field name rules for something this minor, as modifying them would be a breaking change for our users. Adding a new rule just for this seems a bit out of scope. We are working on custom lint plugins for the buf CLI, however, and this may be a good candidate for a custom lint plugin if you'd like to enforce that down the road. Stay tuned. Note that buf doesn't necessarily follow Google's style guide - see https://buf.build/docs/best-practices/style-guide for our recommendations. |
Hi,
I don't see the rule for
field name contains a number
being enforce when using theDEFAULT
lint configuration. The rule is mentioned in https://protobuf.dev/programming-guides/style/When field name like
song_name_1
orsong_1_name
is used, there is no obvious problem when generating javascript and java code, but it is strange that only golang decides to keep the underscore. So the golang code looks like:I can't find an option to turn on the linter to spot the problem, is there any?
The text was updated successfully, but these errors were encountered: