Skip to content

Conversation

@jtkiesel
Copy link
Contributor

@jtkiesel jtkiesel commented Sep 9, 2025

What changed with this PR:

Binary expressions within annotation element value lists or argument lists are now indented, as is done in Prettier TypeScript.

Example

Input

class Example {

  @Annotation(
    "This operation with two very long string should break" +
    "in a very nice way"
  )
  void example() {
    System.out.println(
      "This operation with two very long string should break" +
      "in a very nice way"
    );
  }
}

Output

class Example {

  @Annotation(
    "This operation with two very long string should break" +
      "in a very nice way"
  )
  void example() {
    System.out.println(
      "This operation with two very long string should break" +
        "in a very nice way"
    );
  }
}

Relative issues or prs:

Closes #761

@jtkiesel jtkiesel merged commit 675eb4d into jhipster:main Sep 9, 2025
6 checks passed
@jtkiesel jtkiesel deleted the fix/indent-binary-expressions-in-lists branch September 9, 2025 06:20
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.

String concatenation is not indented

1 participant