Skip to content

Commit

Permalink
Add test for issue #1694
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklockwood committed May 12, 2024
1 parent 816356e commit bbb9645
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Tests/RulesTests+Redundancy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8158,6 +8158,18 @@ class RedundancyTests: RulesTests {
testFormatting(for: input, rule: FormatRules.unusedArguments)
}

func testIssue1694() {
let input = """
listenForUpdates() { [weak self] update, error in
guard let update, error == nil else {
return
}
self?.configure(update)
}
"""
testFormatting(for: input, rule: FormatRules.unusedArguments, exclude: ["redundantParens"])
}

// MARK: redundantClosure

func testRemoveRedundantClosureInSingleLinePropertyDeclaration() {
Expand Down

0 comments on commit bbb9645

Please sign in to comment.