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: blank lines with empty statements #360

Conversation

clementdessoude
Copy link
Contributor

@clementdessoude clementdessoude commented Jan 3, 2020

What changed with this PR:

Fix line breaks in class bodies with empty statements. The calculation of separators between class member declarations was not taking account correctly of empty statements.

Example

// Input
public class Test {
  public TestField testField;;

  @Override
  public void someMethod() {}
}
// Output (v0.6.0)
public class Test {
  public TestField testField;
  @Override
  public void someMethod() {}
}

// Output after PR:
public class Test {
  public TestField testField;

  @Override
  public void someMethod() {}
}

Relative issues or prs:

Fix #356

@clementdessoude clementdessoude marked this pull request as ready for review January 3, 2020 22:22
@clementdessoude clementdessoude changed the title Fix/blank lines empty statements fix: blank lines with empty statements Jan 3, 2020
@clementdessoude clementdessoude merged commit 28d03bb into jhipster:master Jan 3, 2020
@clementdessoude clementdessoude deleted the fix/blank-lines-empty-statements branch January 3, 2020 22:42
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.

Formatting not idempotent with duplicate semicolons
1 participant