-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
Remove Extra String Concat Token #16382
Conversation
LGTM |
@@ -1,19 +1,16 @@ | |||
// ANTLR GENERATED CODE: DO NOT EDIT | |||
package org.elasticsearch.painless; | |||
|
|||
import org.antlr.v4.runtime.CharStream; | |||
import java.util.Set; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might not have meant to indent that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, antlr did that. How did it do that? Oh well, doesn't matter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's auto-generated based on the Lexer file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a personal preference of mine to have the Lexer file look like this --
@header {
import java.util.Set;
}
Instead it can be changed to look like this --
@header {
import java.util.Set;
}
However, I felt that it was more important to make the created content readable over the auto-generated content.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah! That makes sense. Its cool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are going to have to figure out a way to make checkstyle ignore these.... Eventually!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can <suppress checks="." files="org/elasticsearch/painless/PainlessLexer.java"/>
or whatever pattern we need on the end to get any other auto-generated files (something like that, going off-the-cuff here).
Remove Extra String Concat Token
LGTM too |
Renamed no-semicolon tests to work when running gradle. Also removed the ..= token entirely from the grammar as string concatenation now uses the overloaded += operator.