Skip to content

Normalize ANTLR generated code - continued#6808

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

Normalize ANTLR generated code - continued#6808
greg-at-moderne merged 3 commits intomainfrom
greg-antlr-trim-whitespace

Conversation

@greg-at-moderne
Copy link
Contributor

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

#6807 continued, which I accidentally merged too early.

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.

@greg-at-moderne greg-at-moderne marked this pull request as ready for review February 24, 2026 14:10
@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 merged commit 2e79a25 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:18
@github-project-automation github-project-automation bot moved this from Ready to Review to Done in OpenRewrite Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants