GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove redundant semicolons (top level, class/enum bodies, statements) · Issue #156 · openjavaformat/open-java-format

Remove redundant semicolons (top level, class/enum bodies, statements) #156

New issue
Copy link
New issue
Copy link
Open
Open
Remove redundant semicolons (top level, class/enum bodies, statements)#156
Copy link
Labels
enhancementNew feature or requestNew feature or request

Description

@abashev
abashev
opened on Oct 25, 2026
Issue body actions

Upstream: google/google-java-format#1491
Kind: idea | Priority: low

google-java-format#1491 (merged 2026-10-22, copybara export) extends the --cleanup AST pass from google-java-format#1492 so that stray ; are deleted at top level, in class and enum bodies, and as empty statements in blocks. Upstream also moves several existing goldens (for example the semicolon-in-class case) into a "changed by cleanup" set.

Why it matters: our formatter keeps these semicolons, e.g. our golden SemicolonInClass still outputs a lone ; inside the class. It is a harmless tidy-up with a small footprint, but like brace insertion it is a non-whitespace rewrite and should only come with an opt-out.

Examples: not available - the diff shows only the removal of the ;, not the resulting layout of the emptied body in our formatter; our current output keeps the lone ; as in the golden above.

Affected files in our repo:

  • open-java-format/src/main/java/com/palantir/javaformat/java/JavaInputAstVisitor.java (visitEmptyStatement, class body member handling)
  • open-java-format/src/test/resources/com/palantir/javaformat/java/testdata/SemicolonInClass.input and .output

Suggested action: watch / adopt-the-idea together with the brace-insertion ticket; low priority on its own.


Filed from an upstream-watch ticket after manual review.

Activity

  1. abashev
    added
    enhancementNew feature or requestNew feature or request
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.