Closed calda closed 9 months ago
Merging #1553 (3f34cf8) into develop (e3ec9af) will increase coverage by
0.02%
. The diff coverage is97.80%
.
@@ Coverage Diff @@
## develop #1553 +/- ##
===========================================
+ Coverage 94.96% 94.98% +0.02%
===========================================
Files 20 20
Lines 21670 21738 +68
===========================================
+ Hits 20578 20648 +70
+ Misses 1092 1090 -2
Files | Coverage Δ | |
---|---|---|
Sources/ParsingHelpers.swift | 96.60% <100.00%> (-0.01%) |
:arrow_down: |
Sources/FormattingHelpers.swift | 97.68% <97.22%> (+0.01%) |
:arrow_up: |
Sources/Rules.swift | 98.53% <98.14%> (-0.01%) |
:arrow_down: |
Thanks so much Cal ❤️
Happy to heelllppp
This PR updates the
redundantClosure
rule to preserve closures with if/switch expressions if the closure is in a position where an if/switch expression would not be allowed. In Swift 5.9 if/switch expressions are only allowed as either return values, or as the result of an assignment.This PR also fixes miscellaneous issues where
redundantClosure
didn't properly handle some combinations of explicitreturn
,try
/await
, and if/switch expressions.Fixes #1547 and #1548.