Closed calda closed 10 months ago
Merging #1539 (2837d84) into develop (4382436) will increase coverage by
0.01%
. The diff coverage is95.33%
.:exclamation: Current head 2837d84 differs from pull request most recent head cc56e58. Consider uploading reports for the commit cc56e58 to get more accurate results
@@ Coverage Diff @@
## develop #1539 +/- ##
===========================================
+ Coverage 95.04% 95.05% +0.01%
===========================================
Files 20 20
Lines 21478 21593 +115
===========================================
+ Hits 20414 20526 +112
- Misses 1064 1067 +3
Files | Coverage Δ | |
---|---|---|
Sources/FormattingHelpers.swift | 97.65% <94.11%> (-0.05%) |
:arrow_down: |
Sources/ParsingHelpers.swift | 96.65% <95.48%> (-0.08%) |
:arrow_down: |
This PR improves the
conditionalAssignment
andredundantClosure
rules by updating them to parse full expressions, rather than using a set of loose heuristics.This PR adds a
parseExpressionRange
helper, which parses all of the expression types in the Swift grammar. Then we can simplifyblockBodyHasSingleStatement
to just to parse the expression in the body to verify that the entire body is a single expression.Fixes #1538.