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

Empty blocks should have new lines between curly brackets #15

Closed
dangmai opened this issue Jan 31, 2019 · 1 comment
Closed

Empty blocks should have new lines between curly brackets #15

dangmai opened this issue Jan 31, 2019 · 1 comment
Labels
discussion enhancement New feature or request good first issue Good for newcomers

Comments

@dangmai
Copy link
Owner

dangmai commented Jan 31, 2019

Right now, an empty block is formatted like this:

class EmptyClass {}

I think we should change it to this instead:

class EmptyClass {
}

The advantages are two fold:

  • If the user later adds some body to this block, the VCS diff is only confined in that block.
  • Dangling comments can be handled more easily.

There are a few places that would need modifications. Most significantly BlockStatement.

@dangmai dangmai added enhancement New feature or request good first issue Good for newcomers discussion labels Jan 31, 2019
@dangmai
Copy link
Owner Author

dangmai commented Mar 30, 2019

From now on, empty blocks will have empty lines in them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant