OLD | NEW |
(Empty) | |
| 1 40 columns | |
| 2 >>> indented line comment (dartbug.com/16383) |
| 3 class A { |
| 4 // comment |
| 5 } |
| 6 <<< |
| 7 class A { |
| 8 // comment |
| 9 } |
| 10 >>> line comment on opening line |
| 11 class A { // comment |
| 12 } |
| 13 <<< |
| 14 class A { |
| 15 // comment |
| 16 } |
| 17 >>> indented block comment |
| 18 class A { |
| 19 /* comment */ |
| 20 } |
| 21 <<< |
| 22 class A { |
| 23 /* comment */ |
| 24 } |
| 25 >>> block comment with trailing newline |
| 26 class A {/* comment */ |
| 27 } |
| 28 <<< |
| 29 class A { |
| 30 /* comment */ |
| 31 } |
| 32 >>> block comment with leading newline |
| 33 class A { |
| 34 /* comment */} |
| 35 <<< |
| 36 class A { |
| 37 /* comment */ |
| 38 } |
| 39 >>> inline block comment |
| 40 class A { /* comment */ } |
| 41 <<< |
| 42 class A {/* comment */} |
| 43 >>> multiple comments on opening line |
| 44 class A { /* first */ // second |
| 45 } |
| 46 <<< |
| 47 class A { |
| 48 /* first */ // second |
| 49 } |
| 50 >>> multiple inline block comments |
| 51 class A { /* 1 */ /* 2 */ /* 3 */ } |
| 52 <<< |
| 53 class A {/* 1 */ /* 2 */ /* 3 */} |
| 54 >>> multiline trailing block comment |
| 55 class A { /* comment |
| 56 */ } |
| 57 <<< |
| 58 class A { |
| 59 /* comment |
| 60 */ |
| 61 } |
| 62 >>> lines comments at the start of the line in a class body |
| 63 class A { |
| 64 // int a; |
| 65 // int b; |
| 66 int c; |
| 67 } |
| 68 <<< |
| 69 class A { |
| 70 // int a; |
| 71 // int b; |
| 72 int c; |
| 73 } |
| 74 >>> block comment |
| 75 class C/* is cool */{ |
| 76 /* int */ foo(/* comment */) => 42; |
| 77 } |
| 78 <<< |
| 79 class C /* is cool */ { |
| 80 /* int */ foo(/* comment */) => 42; |
| 81 } |
| 82 >>> block comment |
| 83 library foo; |
| 84 /* A long |
| 85 * Comment |
| 86 */ |
| 87 class C /* is cool */ { |
| 88 /* int */ foo() => 42; |
| 89 } |
| 90 <<< |
| 91 library foo; |
| 92 |
| 93 /* A long |
| 94 * Comment |
| 95 */ |
| 96 class C /* is cool */ { |
| 97 /* int */ foo() => 42; |
| 98 } |
| 99 >>> ensure blank line above doc comments |
| 100 class Foo {var a = 1; |
| 101 /// doc |
| 102 var b = 2;} |
| 103 <<< |
| 104 class Foo { |
| 105 var a = 1; |
| 106 |
| 107 /// doc |
| 108 var b = 2; |
| 109 } |
| 110 >>> remove blank line before beginning of body |
| 111 class A { |
| 112 |
| 113 |
| 114 |
| 115 // comment |
| 116 } |
| 117 <<< |
| 118 class A { |
| 119 // comment |
| 120 } |
| 121 >>> nested flush left comment |
| 122 class Foo { |
| 123 method() { |
| 124 // flush |
| 125 } |
| 126 } |
| 127 <<< |
| 128 class Foo { |
| 129 method() { |
| 130 // flush |
| 131 } |
| 132 } |
| 133 >>> nested flush left after non-nested |
| 134 class Foo { |
| 135 method() { |
| 136 // ... |
| 137 // flush |
| 138 } |
| 139 } |
| 140 <<< |
| 141 class Foo { |
| 142 method() { |
| 143 // ... |
| 144 // flush |
| 145 } |
| 146 } |
| 147 >>> force doc comment between classes to have two newlines before |
| 148 class Foo {} /** |
| 149 */ |
| 150 class Bar {} |
| 151 <<< |
| 152 class Foo {} |
| 153 |
| 154 /** |
| 155 */ |
| 156 class Bar {} |
| 157 >>> force doc comment between classes to have newline after |
| 158 class Foo {} |
| 159 /** |
| 160 */ class Bar {} |
| 161 <<< |
| 162 class Foo {} |
| 163 |
| 164 /** |
| 165 */ |
| 166 class Bar {} |
OLD | NEW |