Skip to content

fix: correct indentation of assignment operations#602

Merged
pascalgrimaud merged 1 commit intojhipster:mainfrom
jtkiesel:fix/assignment-indentation
Aug 29, 2023
Merged

fix: correct indentation of assignment operations#602
pascalgrimaud merged 1 commit intojhipster:mainfrom
jtkiesel:fix/assignment-indentation

Conversation

@jtkiesel
Copy link
Copy Markdown
Contributor

What changed with this PR:

Non-declarative assignment operations now indent properly again.

Example

Input

class Example {

  void example() {
    fileSystemDetails =
      FileHandlerDetails
        .builder()
        .fileSystemType(
          EntityUtils.update(
            entity.getFileSystemDetails().getFileSystemType(),
            update.getFileSystemDetails().getFileSystemType()
          )
        );

    aaaaaaaaaaaaaaaaa = bbbbbbbbbbbbbbbbb ? ccccccccccccccccc : ddddddddddddddddd;

    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb = ccccccccccccccccccccccccccccccccccccccc + ddddddddddddddddddddddddddddddddd;
  }
}

Output

class Example {

  void example() {
    fileSystemDetails =
      FileHandlerDetails
        .builder()
        .fileSystemType(
          EntityUtils.update(
            entity.getFileSystemDetails().getFileSystemType(),
            update.getFileSystemDetails().getFileSystemType()
          )
        );

    aaaaaaaaaaaaaaaaa =
      bbbbbbbbbbbbbbbbb ? ccccccccccccccccc : ddddddddddddddddd;

    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =
      bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb =
        ccccccccccccccccccccccccccccccccccccccc +
        ddddddddddddddddddddddddddddddddd;
  }
}

Relative issues or prs:

Closes #601

@pascalgrimaud pascalgrimaud merged commit f74555d into jhipster:main Aug 29, 2023
@jtkiesel jtkiesel deleted the fix/assignment-indentation branch August 29, 2023 06:50
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.

Indentation issues since 2.3.0

2 participants