@@ -14,33 +14,33 @@ final class BeginDocumentationCommentWithOneLineSummaryTests: LintOrFormatRuleTe
1414 assertLint (
1515 BeginDocumentationCommentWithOneLineSummary . self,
1616 """
17- /// Returns a bottle of Dr Pepper from the vending machine.
18- public func drPepper(from vendingMachine: VendingMachine) -> Soda {}
17+ /// Returns a bottle of Dr Pepper from the vending machine.
18+ public func drPepper(from vendingMachine: VendingMachine) -> Soda {}
1919
20- /// Contains a comment as description that needs a sentence
21- /// of two lines of code.
22- public var twoLinesForOneSentence = " test "
20+ /// Contains a comment as description that needs a sentence
21+ /// of two lines of code.
22+ public var twoLinesForOneSentence = " test "
2323
24- /// The background color of the view.
25- var backgroundColor: UIColor
24+ /// The background color of the view.
25+ var backgroundColor: UIColor
2626
27- /// Returns the sum of the numbers.
28- ///
29- /// - Parameter numbers: The numbers to sum.
30- /// - Returns: The sum of the numbers.
31- func sum(_ numbers: [Int]) -> Int {
32- // ...
33- }
27+ /// Returns the sum of the numbers.
28+ ///
29+ /// - Parameter numbers: The numbers to sum.
30+ /// - Returns: The sum of the numbers.
31+ func sum(_ numbers: [Int]) -> Int {
32+ // ...
33+ }
3434
35- /// This docline should not succeed.
36- /// There are two sentences without a blank line between them.
37- 1️⃣struct Test {}
35+ /// This docline should not succeed.
36+ /// There are two sentences without a blank line between them.
37+ 1️⃣struct Test {}
3838
39- /// This docline should not succeed. There are two sentences.
40- 2️⃣public enum Token { case comma, semicolon, identifier }
39+ /// This docline should not succeed. There are two sentences.
40+ 2️⃣public enum Token { case comma, semicolon, identifier }
4141
42- /// Should fail because it doesn't have a period
43- 3️⃣public class testNoPeriod {}
42+ /// Should fail because it doesn't have a period
43+ 3️⃣public class testNoPeriod {}
4444 """ ,
4545 findings: [
4646 FindingSpec ( " 1️⃣ " , message: #"add a blank comment line after this sentence: "This docline should not succeed.""# ) ,
@@ -54,36 +54,36 @@ final class BeginDocumentationCommentWithOneLineSummaryTests: LintOrFormatRuleTe
5454 assertLint (
5555 BeginDocumentationCommentWithOneLineSummary . self,
5656 """
57- /**
58- * Returns the numeric value.
59- *
60- * - Parameters:
61- * - digit: The Unicode scalar whose numeric value should be returned.
62- * - radix: The radix, between 2 and 36, used to compute the numeric value.
63- * - Returns: The numeric value of the scalar.*/
64- func numericValue(of digit: UnicodeScalar, radix: Int = 10) -> Int {}
65-
66- /**
67- * This block comment contains a sentence summary
68- * of two lines of code.
69- */
70- public var twoLinesForOneSentence = " test "
71-
72- /**
73- * This block comment should not succeed, struct.
74- * There are two sentences without a blank line between them.
75- */
76- 1️⃣struct TestStruct {}
77-
78- /**
79- This block comment should not succeed, class.
80- Add a blank comment after the first line.
81- */
82- 2️⃣public class TestClass {}
83- /** This block comment should not succeed, enum. There are two sentences. */
84- 3️⃣public enum testEnum {}
85- /** Should fail because it doesn't have a period */
86- 4️⃣public class testNoPeriod {}
57+ /**
58+ * Returns the numeric value.
59+ *
60+ * - Parameters:
61+ * - digit: The Unicode scalar whose numeric value should be returned.
62+ * - radix: The radix, between 2 and 36, used to compute the numeric value.
63+ * - Returns: The numeric value of the scalar.*/
64+ func numericValue(of digit: UnicodeScalar, radix: Int = 10) -> Int {}
65+
66+ /**
67+ * This block comment contains a sentence summary
68+ * of two lines of code.
69+ */
70+ public var twoLinesForOneSentence = " test "
71+
72+ /**
73+ * This block comment should not succeed, struct.
74+ * There are two sentences without a blank line between them.
75+ */
76+ 1️⃣struct TestStruct {}
77+
78+ /**
79+ This block comment should not succeed, class.
80+ Add a blank comment after the first line.
81+ */
82+ 2️⃣public class TestClass {}
83+ /** This block comment should not succeed, enum. There are two sentences. */
84+ 3️⃣public enum testEnum {}
85+ /** Should fail because it doesn't have a period */
86+ 4️⃣public class testNoPeriod {}
8787 """ ,
8888 findings: [
8989 FindingSpec ( " 1️⃣ " , message: #"add a blank comment line after this sentence: "This block comment should not succeed, struct.""# ) ,
0 commit comments