Remove extra semicolons

MSAL

Removes unnecessary semicolons. Semicolons are considered unnecessary:

  • at the end of try-with-resources,
  • after the last enum value if no field or method is defined,
  • when there is no statement between two semicolons.

Stray semicolons are typically typos or remnants of refactoring and can mislead readers into thinking a statement is present.

org.openrewrite.staticanalysis.RemoveExtraSemicolons
mod run . --recipe=org.openrewrite.staticanalysis.RemoveExtraSemicolons

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.