dart-lang / dart_style

An opinionated formatter/linter for Dart code
https://pub.dev/packages/dart_style
BSD 3-Clause "New" or "Revised" License
646 stars 120 forks source link

Add a line break between annotated fields #492

Open xvrh opened 8 years ago

xvrh commented 8 years ago

The last version of the formatter puts each attribute on his own line, this is great. I would like it adds some empty line between the annotated fields to be a bit more clear. i.e.:

@myAttribute
String aVariable1;
@myAttribute
String aVariable2;
String aVariable3;

becomes

@myAttribute
String aVariable1;

@myAttribute
String aVariable2;

String aVariable3;
zoechi commented 8 years ago

I also find it very hard to read without additional line breaks.

munificent commented 8 years ago

I'd like it to force them too, but it's a little tricky to implement so I haven't yet. In the meantime, if you add blank lines yourself there, it should preserve them.