Skip to content

Commit 588f3a8

Browse files
committed
Migrate StatementPositionRule from SourceKit to SwiftSyntax
Convert StatementPositionRule to use SwiftSyntax instead of SourceKit for improved performance and more accurate positioning validation. The SwiftSyntax implementation: - Uses ViolationsSyntaxVisitor and ViolationsSyntaxRewriter patterns - Validates else/catch keyword positioning with proper indentation checks - Supports both default (same line) and uncuddled (next line) modes - Correctly handles trailing/leading trivia for whitespace validation - Implements corrections using explicit rewriter for both statement types - Extracts common validation logic to reduce code duplication - Skip correcting when there are comments
1 parent f7f3caa commit 588f3a8

File tree

4 files changed

+696
-161
lines changed

4 files changed

+696
-161
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
* `file_header`
3636
* `file_length`
3737
* `line_length`
38+
* `statement_position`
3839
* `trailing_whitespace`
3940
* `vertical_whitespace`
4041
<!-- Keep empty line to have the contributors on a separate line. -->

0 commit comments

Comments
 (0)