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

Fix indentations of the inner elements on the same line/139 #141

Merged
merged 4 commits into from
Dec 19, 2020

Conversation

yoheimuta
Copy link
Owner

@yoheimuta yoheimuta merged commit f309b98 into master Dec 19, 2020
@yoheimuta yoheimuta deleted the fix-indentatino-inner-elements-on-the-same-line/139 branch December 19, 2020 02:22
@yoheimuta
Copy link
Owner Author

I confirmed locally that #139 was fixed.
See the below command logs.

~/w/p/g/s/g/y/protolint ❯❯❯ echo '
> syntax = "proto3";
> 
> package foobar;
> 
> option java_package = "com.test.foo.bar";
> 
> message TestMessage { string test_field = 1; }
> ' > /tmp/issue_139/test.proto
~/w/p/g/s/g/y/protolint ❯❯❯ ./protolint /tmp/issue_139
[../../../../../../../../../tmp/issue_139/test.proto:8:23] Found a possible incorrect indentation style. Inserting a new line is recommended.
[../../../../../../../../../tmp/issue_139/test.proto:8:46] Found a possible incorrect indentation style. Inserting a new line is recommended.
~/w/p/g/s/g/y/protolint ❯❯❯ ./protolint -fix /tmp/issue_139
[../../../../../../../../../tmp/issue_139/test.proto:8:23] Found a possible incorrect indentation style. Inserting a new line is recommended.
[../../../../../../../../../tmp/issue_139/test.proto:8:46] Found a possible incorrect indentation style. Inserting a new line is recommended.
~/w/p/g/s/g/y/protolint ❯❯❯ cat /tmp/issue_139/test.proto

syntax = "proto3";

package foobar;

option java_package = "com.test.foo.bar";

message TestMessage {
  string test_field = 1;
}
~/w/p/g/s/g/y/protolint ❯❯❯ echo '
syntax = "proto3";

package foobar;

option java_package = "com.test.foo.bar";

message TestMessage { string test_field = 1; }
' > /tmp/issue_139/test.proto
~/w/p/g/s/g/y/protolint ❯❯❯ ./protolint -config_dir_path ./_example/config /tmp/issue_139
[../../../../../../../../../tmp/issue_139/test.proto:2:1] Syntax should be "proto2" but was "proto3".
[../../../../../../../../../tmp/issue_139/test.proto:8:23] Field "test_field" should have a comment of the form "// test_field ..."
[../../../../../../../../../tmp/issue_139/test.proto:8:1] Message "TestMessage" should have a comment of the form "// TestMessage ..."
~/w/p/g/s/g/y/protolint ❯❯❯ ./protolint -fix -config_dir_path ./_example/config /tmp/issue_139
[../../../../../../../../../tmp/issue_139/test.proto:2:1] Syntax should be "proto2" but was "proto3".
[../../../../../../../../../tmp/issue_139/test.proto:8:23] Field "test_field" should have a comment of the form "// test_field ..."
[../../../../../../../../../tmp/issue_139/test.proto:8:1] Message "TestMessage" should have a comment of the form "// TestMessage ..."
~/w/p/g/s/g/y/protolint ❯❯❯ cat /tmp/issue_139/test.proto

syntax = "proto3";

package foobar;

option java_package = "com.test.foo.bar";

message TestMessage { string test_field = 1; }

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

Successfully merging this pull request may close these issues.

1 participant