Skip to content

Normalize ANTLR generated code#6807

Merged
greg-at-moderne merged 2 commits intomainfrom
greg-antlr-trim-whitespace
Feb 24, 2026
Merged

Normalize ANTLR generated code#6807
greg-at-moderne merged 2 commits intomainfrom
greg-antlr-trim-whitespace

Conversation

@greg-at-moderne
Copy link
Copy Markdown
Contributor

@greg-at-moderne greg-at-moderne commented Feb 24, 2026

What's changed?

Add Gradle logic to normalize ANTLR generated code which we have decided to store in Git:

  1. license header added
  2. trailing whitespace removed
  3. fixed path in the // Generated from line from ANTLR

What's your motivation?

Basically keep the output files more deterministic. Respectively, to be specific:

  1. Avoid the need to run the ./gradlew licenseMain on them.
  2. Fewer diffs.
  3. Fewer diffs if a new person generates the ANTLR.

@github-project-automation github-project-automation Bot moved this from In Progress to Ready to Review in OpenRewrite Feb 24, 2026
@greg-at-moderne greg-at-moderne marked this pull request as ready for review February 24, 2026 14:02
@greg-at-moderne greg-at-moderne merged commit bbede7e into main Feb 24, 2026
1 check passed
@greg-at-moderne greg-at-moderne deleted the greg-antlr-trim-whitespace branch February 24, 2026 14:02
@github-project-automation github-project-automation Bot moved this from Ready to Review to Done in OpenRewrite Feb 24, 2026
macsux pushed a commit that referenced this pull request Feb 27, 2026
* Normalize ANTLR generated code

* Add missing license headers

---------

Co-authored-by: Tim te Beek <tim@moderne.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants