Skip to content

Commit fc1cd1f

Browse files
committed
Fix SwiftLint issues
1 parent 31c851b commit fc1cd1f

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

Sources/GitBuddyCore/Models/Changelog.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ struct SectionedChangelog: Changelog {
5050
let description: String
5151

5252
let itemIdentifiers: [PullRequestID: [IssueID]]
53-
53+
5454
init(issues: [Issue], pullRequests: [PullRequest]) {
5555
description =
5656
"""

Sources/GitBuddyCore/Models/ChangelogItem.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ struct ChangelogItem {
3535
guard var title = input.title else { return nil }
3636
title = title.prefix(1).uppercased() + title.dropFirst()
3737
title = title.removingEmojis().trimmingCharacters(in: .whitespaces)
38-
38+
3939
if let htmlURL = input.htmlURL {
4040
title += " ([#\(input.number)](\(htmlURL)))"
4141
}

Tests/GitBuddyTests/GitHub/IssueResolverTests.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,61 +62,61 @@ final class IssueResolverTests: XCTestCase {
6262
"Resolves",
6363
"resolved"
6464
]
65-
65+
6666
let issueNumber = 4343
6767

6868
issueClosingKeywords.forEach { (closingKeyword) in
6969
let description = examplePullRequestDescriptionUsing(closingKeyword: closingKeyword, issueNumber: issueNumber)
7070
XCTAssertEqual(description.resolvingIssues(), [issueNumber])
7171
}
7272
}
73-
73+
7474
/// It should not extract anything if no issue number is found.
7575
func testResolvingNoReferencedIssue() {
7676
let description = examplePullRequestDescriptionUsing(closingKeyword: "fixes", issueNumber: nil)
7777
XCTAssertTrue(description.resolvingIssues().isEmpty)
7878
}
79-
79+
8080
/// It should not extract anything if no closing keyword is found.
8181
func testResolvingNoClosingKeyword() {
8282
let issueNumber = 4343
8383

8484
let description = examplePullRequestDescriptionUsing(closingKeyword: "", issueNumber: issueNumber)
8585
XCTAssertTrue(description.resolvingIssues().isEmpty)
8686
}
87-
87+
8888
/// It should extract mulitple issues.
8989
func testResolvingMultipleIssues() {
9090
let description = "This is a beautiful PR that close #123 for real. It also fixes #1 and fixes #2"
9191
let resolvedIssues = description.resolvingIssues()
9292
XCTAssertEqual(resolvedIssues.count, 3)
9393
XCTAssertEqual(Set(description.resolvingIssues()), Set([123, 1, 2]))
9494
}
95-
95+
9696
/// It should deduplicate if the same issue is closed multiple times.
9797
func testResolvingMultipleIssuesDedup() {
9898
let description = "This is a beautiful PR that close #123 for real. It also fixes #123"
9999
XCTAssertEqual(description.resolvingIssues(), [123])
100100
}
101-
101+
102102
/// It should not extract anything if there is no number after the #.
103103
func testResolvingNoNumber() {
104104
let description = "This is a beautiful PR that close # for real."
105105
XCTAssertTrue(description.resolvingIssues().isEmpty)
106106
}
107-
107+
108108
/// It should not extract anything if there is no number after the #, and it's at the end.
109109
func testResolvingNoNumberLast() {
110110
let description = "This is a beautiful PR that close #"
111111
XCTAssertTrue(description.resolvingIssues().isEmpty)
112112
}
113-
113+
114114
/// It should extract the issue if it's first.
115115
func testResolvingIssueFirst() {
116116
let description = "Resolves #123. Yay!"
117117
XCTAssertEqual(description.resolvingIssues(), [123])
118118
}
119-
119+
120120
/// It should extract the issue if it's the only thing present.
121121
func testResolvingIssueOnly() {
122122
let description = "Resolved #123"
@@ -127,7 +127,7 @@ final class IssueResolverTests: XCTestCase {
127127
extension IssueResolverTests {
128128
func examplePullRequestDescriptionUsing(closingKeyword: String, issueNumber: Int?) -> String {
129129
let issueNumberString = issueNumber?.description ?? ""
130-
130+
131131
return """
132132
This PR does a lot of awesome stuff.
133133
It even closes some issues!

0 commit comments

Comments
 (0)