Skip to content

feature: add blank line in enums between constants & declarations#351

Merged
clementdessoude merged 1 commit intojhipster:masterfrom
clementdessoude:feature/blank-line-enumBodyDeclarations
Jan 1, 2020
Merged

feature: add blank line in enums between constants & declarations#351
clementdessoude merged 1 commit intojhipster:masterfrom
clementdessoude:feature/blank-line-enumBodyDeclarations

Conversation

@clementdessoude
Copy link
Copy Markdown
Contributor

@clementdessoude clementdessoude commented Dec 30, 2019

Fix #309

In this PR, I always add a blank line before enumBodyDeclarations.

So we would get this formatting

// This input
public enum EnumWithExtraCommaAndEnumBodyDeclarations {
  THIS_IS_GOOD("abc"),
  THIS_IS_FINE("abc");
  public static final String thisWillBeDeleted = "DELETED";
}

// or this input
public enum EnumWithExtraCommaAndEnumBodyDeclarations {
  THIS_IS_GOOD("abc"),
  THIS_IS_FINE("abc");
  public static final String thisWillBeDeleted = "DELETED";
}

// will be formatted to this output
public enum EnumWithExtraCommaAndEnumBodyDeclarations {
  THIS_IS_GOOD("abc"),
  THIS_IS_FINE("abc");

  public static final String thisWillBeDeleted = "DELETED";
}

@clementdessoude clementdessoude changed the title feature: consistently add a blank line between enumConstantList and enumBodyDeclarations feature: add blank line in enums between constants & declarations Jan 1, 2020
@clementdessoude clementdessoude merged commit c5f012e into jhipster:master Jan 1, 2020
@clementdessoude clementdessoude deleted the feature/blank-line-enumBodyDeclarations branch January 1, 2020 15:57
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.

Blank line is removed in enum

1 participant