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

Rule to separate fields by newline #286

Open
ricsiLT opened this issue Oct 3, 2022 · 1 comment
Open

Rule to separate fields by newline #286

ricsiLT opened this issue Oct 3, 2022 · 1 comment
Labels
question Further information is requested

Comments

@ricsiLT
Copy link

ricsiLT commented Oct 3, 2022

Hi, would it be easy to add a rule that would disallow this:

message Foo {
  // Example 1
  int32 field_one = 1;
  // Example 2
  int32 field_two = 2;
}

and force you to do this:

message Foo {
  // Example 1
  int32 field_one = 1;

  // Example 2
  int32 field_two = 2;
}
@yoheimuta yoheimuta added the question Further information is requested label Oct 9, 2022
@yoheimuta
Copy link
Owner

@ricsiLT Yes. It's possible and not much difficult.
You can use the position info of each message field to detect violations.

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

No branches or pull requests

2 participants