| 40 columns | |
| >>> Remove blank lines at top of file. |
| |
| |
| // comment |
| <<< |
| // comment |
| >>> Remove blank lines at end of file. |
| // comment |
| |
| |
| |
| |
| <<< |
| // comment |
| >>> Keep up to one blank line between top level comments. |
| |
| // one |
| |
| // two |
| // three |
| |
| |
| |
| // four |
| |
| |
| <<< |
| // one |
| |
| // two |
| // three |
| |
| // four |
| >>> Remove extra spaces between adjacent inline block comments. |
| /* foo */ /* bar */ |
| <<< |
| /* foo */ /* bar */ |
| >>> Inline comment between different kinds of directives. |
| library a; /* comment */ import 'b.dart'; |
| <<< |
| library a; /* comment */ |
| |
| import 'b.dart'; |
| >>> Inline comment between directives. |
| import 'a.dart'; /* comment */ import 'b.dart'; |
| <<< |
| import 'a.dart'; /* comment */ |
| import 'b.dart'; |
| >>> Inline comment after directive. |
| import 'a.dart'; /* comment */ |
| import 'b.dart'; |
| <<< |
| import 'a.dart'; /* comment */ |
| import 'b.dart'; |
| >>> Inline comment before directive. |
| import 'a.dart'; |
| /* comment */ import 'b.dart'; |
| <<< |
| import 'a.dart'; |
| /* comment */ |
| import 'b.dart'; |
| >>> Ensure blank line above doc comments on top level directives and declarations. |
| #!script |
| /// Doc library. |
| library; |
| /// Doc export. |
| export 'a.dart'; |
| /// Doc import. |
| import 'a.dart'; |
| /// Doc class. |
| class C {} |
| /// Doc variable. |
| var a = 1; |
| /// Doc function. |
| void b() => body; |
| /// Doc function. |
| void c() {;} |
| <<< |
| #!script |
| |
| /// Doc library. |
| library; |
| |
| /// Doc export. |
| export 'a.dart'; |
| |
| /// Doc import. |
| import 'a.dart'; |
| |
| /// Doc class. |
| class C {} |
| |
| /// Doc variable. |
| var a = 1; |
| |
| /// Doc function. |
| void b() => body; |
| |
| /// Doc function. |
| void c() { |
| ; |
| } |
| >>> Preserve one blank line between a leading comment and declaration. |
| // comment |
| |
| |
| |
| var a = 1; |
| <<< |
| // comment |
| |
| var a = 1; |
| >>> Preserve one blank line between a leading comment and directive. |
| // comment |
| |
| |
| |
| import 'x.dart'; |
| <<< |
| // comment |
| |
| import 'x.dart'; |
| >>> Preserve one blank line between comments and declarations. |
| // comment |
| var a = 1; |
| |
| // comment |
| |
| var b = 2; |
| |
| |
| |
| // comment |
| |
| |
| |
| var c = 3; |
| <<< |
| // comment |
| var a = 1; |
| |
| // comment |
| |
| var b = 2; |
| |
| // comment |
| |
| var c = 3; |