You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While writing a custom rule FIELD_NAMES_CAMEL_CASE I discovered that oneof fields are not linted by the rule FIELD_NAMES_LOWER_SNAKE_CASE or FIELDS_HAVE_COMMENT.
This will pass linting even with the FIELD_NAMES_LOWER_SNAKE_CASE and/or FIELDS_HAVE_COMMENT enabled - when I'd expect it to complain about the MyField not being lower snake case and/or containing a comment.
Regardless of that, your suggestion might be appropriate as Language Guide uses underscore_separated_names for oneof name. And it makes sense that protolint needs to provide a way to complain about the MyField not containing a comment at least.
Meanwhile, I'm not sure oneof (not oneof fields) should be dealt with as fields.
What do you think?
While writing a custom rule
FIELD_NAMES_CAMEL_CASE
I discovered thatoneof
fields are not linted by the ruleFIELD_NAMES_LOWER_SNAKE_CASE
orFIELDS_HAVE_COMMENT
.For example, if you have;
This will pass linting even with the
FIELD_NAMES_LOWER_SNAKE_CASE
and/orFIELDS_HAVE_COMMENT
enabled - when I'd expect it to complain about theMyField
not being lower snake case and/or containing a comment.Am I correct in thinking this is how it should behave or is that not the intended behaviour? It looks as if that's how it should behave.
The text was updated successfully, but these errors were encountered: