Skip to content

Commit 464e871

Browse files
authored
Return no violation silently if response is empty
1 parent a779c91 commit 464e871

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Sources/Danger/Plugins/SwiftLint/SwiftLint.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,9 @@ extension SwiftLint {
307307
}
308308

309309
private static func makeViolations(from response: String, failAction: (String) -> Void) -> [SwiftLintViolation] {
310+
guard !response.isEmpty else {
311+
return []
312+
}
310313
let decoder = JSONDecoder()
311314
do {
312315
let violations = try decoder.decode([SwiftLintViolation].self, from: Data(response.utf8))

0 commit comments

Comments
 (0)