Skip to content
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

fix: add whitespace between label and statement #689

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

jtkiesel
Copy link
Contributor

What changed with this PR:

Labeled statements are now printed with a space between the label and the statement.

Example

Input

class Example {

  void labeledForLoop() {
    label:for (int i = 0; i < 1; i++) {}
  }

  void labeledBlockStatement() {
    label:{
      example();
    }
  }
}

Output

class Example {

  void labeledForLoop() {
    label: for (int i = 0; i < 1; i++) {}
  }

  void labeledBlockStatement() {
    label: {
      example();
    }
  }
}

Relative issues or prs:

Closes #686

@jtkiesel jtkiesel merged commit 06a663d into main Oct 11, 2024
11 checks passed
@jtkiesel jtkiesel deleted the fix/labeled-statement-whitespace branch October 11, 2024 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Checkstyle - WhitespaceAround: '{' is not preceded with whitespace.
1 participant