-
Notifications
You must be signed in to change notification settings - Fork 356
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
Allowing for trailing dollars and percent signs in String literals #4625
Allowing for trailing dollars and percent signs in String literals #4625
Conversation
Hmm. Now I see the autogenerated Java files by ANTLR observe removed copyright/license notices. Not sure how to restore them (other than manual crafting them). Looking into it. |
ought to help; although the bot also should chime in soon. |
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.
Some suggestions could not be made:
- rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/HCLParserBaseListener.java
- lines 1-0
- rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/HCLParserBaseVisitor.java
- lines 1-0
- rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/HCLParserListener.java
- lines 1-0
- rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/HCLParserVisitor.java
- lines 1-0
- rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/JsonPathParserBaseListener.java
- lines 1-0
- rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/JsonPathParserBaseVisitor.java
- lines 1-0
- rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/JsonPathParserListener.java
- lines 1-0
- rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/JsonPathParserVisitor.java
- lines 1-0
rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/HCLLexer.java
Outdated
Show resolved
Hide resolved
rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/HCLLexer.java
Outdated
Show resolved
Hide resolved
rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/HCLLexer.java
Outdated
Show resolved
Hide resolved
rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/HCLParser.java
Outdated
Show resolved
Hide resolved
rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/HCLParser.java
Show resolved
Hide resolved
rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/JsonPathParser.java
Outdated
Show resolved
Hide resolved
rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/JsonPathParserBaseListener.java
Outdated
Show resolved
Hide resolved
rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/JsonPathParserBaseVisitor.java
Outdated
Show resolved
Hide resolved
rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/JsonPathParserListener.java
Outdated
Show resolved
Hide resolved
rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/JsonPathParserVisitor.java
Outdated
Show resolved
Hide resolved
Thanks! Didn't know. |
rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/HCLLexer.java
Outdated
Show resolved
Hide resolved
rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/HCLLexer.java
Outdated
Show resolved
Hide resolved
rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/HCLParser.java
Show resolved
Hide resolved
rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/HCLParser.java
Outdated
Show resolved
Hide resolved
rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/HCLParserBaseListener.java
Outdated
Show resolved
Hide resolved
rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/JsonPathParser.java
Outdated
Show resolved
Hide resolved
rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/JsonPathParserBaseListener.java
Outdated
Show resolved
Hide resolved
rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/JsonPathParserBaseVisitor.java
Outdated
Show resolved
Hide resolved
rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/JsonPathParserListener.java
Outdated
Show resolved
Hide resolved
rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/JsonPathParserVisitor.java
Outdated
Show resolved
Hide resolved
I need help in deciding what to do with the next batch of bot suggestions here. Which BTW, to me is a sign this code shouldn't be checked-in to VCS. |
rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/HCLParser.java
Outdated
Show resolved
Hide resolved
rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/grammar/JsonPathParser.java
Show resolved
Hide resolved
Thanks a lot for the fixes here @mccartney ; I agree it feels odd to apply recipe fixes to generated code, but that's what we've come to do (for now) to clear out issues on code such that the bot only ever sees net-new issues on PRs. Since the changes are automated I think it's fine for now; longer term we can look at excluding those files from recipe changes. |
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.
On the subject of the code changes here; would you mind educating me a bit on what you've changed and the process behind regenerating those parsers? 😅 Would help me review & verify, as the changes look good already but I'd like the process to be repeatable for the next one.
Sure:
|
IMHO the best way for this process be repeatable and self-documented is |
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.
Great to see these issues resolved so quickly after you've reported them here. Thanks for the helpful pointers as well on a part I hadn't seen much of before. 🙏🏻
What's changed?
Changing the HCL lexing/parsing grammar to allow for
$
and%
signs at the end of String literals.What's your motivation?
Until now it hasn't been allowed, which I think is a bug as described in:
Checklist