Skip to content

Commit 34551d1

Browse files
committed
OmitExplicitReturns: replace backticks with quotes in the Lint diagnostic message
1 parent 9e0f249 commit 34551d1

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Sources/SwiftFormat/Rules/OmitExplicitReturns.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,5 +144,5 @@ public final class OmitExplicitReturns: SyntaxFormatRule {
144144

145145
extension Finding.Message {
146146
public static let omitReturnStatement: Finding.Message =
147-
"`return` can be omitted because body consists of a single expression"
147+
"'return' can be omitted because body consists of a single expression"
148148
}

Tests/SwiftFormatTests/Rules/OmitReturnsTests.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ final class OmitReturnsTests: LintOrFormatRuleTestCase {
1717
}
1818
""",
1919
findings: [
20-
FindingSpec("1️⃣", message: "`return` can be omitted because body consists of a single expression")
20+
FindingSpec("1️⃣", message: "'return' can be omitted because body consists of a single expression")
2121
])
2222
}
2323

@@ -35,7 +35,7 @@ final class OmitReturnsTests: LintOrFormatRuleTestCase {
3535
}
3636
""",
3737
findings: [
38-
FindingSpec("1️⃣", message: "`return` can be omitted because body consists of a single expression")
38+
FindingSpec("1️⃣", message: "'return' can be omitted because body consists of a single expression")
3939
])
4040
}
4141

@@ -75,8 +75,8 @@ final class OmitReturnsTests: LintOrFormatRuleTestCase {
7575
}
7676
""",
7777
findings: [
78-
FindingSpec("1️⃣", message: "`return` can be omitted because body consists of a single expression"),
79-
FindingSpec("2️⃣", message: "`return` can be omitted because body consists of a single expression")
78+
FindingSpec("1️⃣", message: "'return' can be omitted because body consists of a single expression"),
79+
FindingSpec("2️⃣", message: "'return' can be omitted because body consists of a single expression")
8080
])
8181
}
8282

@@ -112,8 +112,8 @@ final class OmitReturnsTests: LintOrFormatRuleTestCase {
112112
}
113113
""",
114114
findings: [
115-
FindingSpec("1️⃣", message: "`return` can be omitted because body consists of a single expression"),
116-
FindingSpec("2️⃣", message: "`return` can be omitted because body consists of a single expression")
115+
FindingSpec("1️⃣", message: "'return' can be omitted because body consists of a single expression"),
116+
FindingSpec("2️⃣", message: "'return' can be omitted because body consists of a single expression")
117117
])
118118
}
119119
}

0 commit comments

Comments
 (0)