File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ public extension FormatRule {
152152 }
153153
154154 guard let expectedCommentBody = markForType else {
155- return
155+ continue
156156 }
157157
158158 // When inserting a mark before the first declaration,
Original file line number Diff line number Diff line change @@ -996,4 +996,34 @@ class MarkTypesTests: XCTestCase {
996996
997997 testFormatting ( for: input, output, rule: . markTypes)
998998 }
999+
1000+ func testMarksTypeAfterExtension( ) {
1001+ let input = """
1002+ extension Foo {
1003+ var foo: Foo { Foo() }
1004+ var bar: Bar { Bar() }
1005+ }
1006+
1007+ struct Baaz {
1008+ let foo: Foo
1009+ let bar: Bar
1010+ }
1011+ """
1012+
1013+ let output = """
1014+ extension Foo {
1015+ var foo: Foo { Foo() }
1016+ var bar: Bar { Bar() }
1017+ }
1018+
1019+ // MARK: - Baaz
1020+
1021+ struct Baaz {
1022+ let foo: Foo
1023+ let bar: Bar
1024+ }
1025+ """
1026+
1027+ testFormatting ( for: input, output, rule: . markTypes)
1028+ }
9991029}
You can’t perform that action at this time.
0 commit comments