Commit Graph
9 Commits
Author SHA1 Message Date
Marcelo Fabri 7b1099a33d Rewrite prefixed_toplevel_constant with SwiftSyntax (#4425) 2022-10-21 13:11:40 -07:00
Danny Mösch a8bc9e9b42 Let more rules rely on SwiftSyntaxRule's defaults (#4401) 2022-10-18 02:23:39 -04:00
Danny Mösch 0fbd03cf2b Require visitors to exist (#4383) 2022-10-16 18:40:12 +02:00
Danny Mösch f8e5339c69 Introduce ReasonedRuleViolation type to associate a reason with a violation position (#4379) 2022-10-16 12:53:38 +02:00
Marcelo FabriandDanny Mösch 9959f971f9 Add way to preprocess syntaxTree in SwiftSyntaxRule (#4381)
* Add way to preprocess syntaxTree in SwiftSyntaxRule

* Update Source/SwiftLintFramework/Protocols/SwiftSyntaxRule.swift

Co-authored-by: Danny Mösch <danny.moesch@icloud.com>

* Update Source/SwiftLintFramework/Protocols/SwiftSyntaxRule.swift

Co-authored-by: Danny Mösch <danny.moesch@icloud.com>

Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2022-10-16 01:40:02 -07:00
Danny Mösch bd8c9e5bcb Provide syntax visitor base class allowing for convenient skipping of declaration nodes (#4310) 2022-10-15 19:03:49 +02:00
JP Simard 0282bf1923 Remove optionality in getting syntax tree and source location converter (#4353)
Parsing does not throw errors.
See https://github.com/apple/swift-syntax/pull/912.
2022-10-12 12:50:17 -04:00
Danny Mösch ab3f070222 Introduce SeverityBasedRuleConfiguration to avoid custom makeViolations (#4274) 2022-10-04 07:39:07 +02:00
JP Simard 5a30991fa4 Add SwiftSyntax rule helpers (#4126)
This cuts down on the boilerplate involved in writing SwiftSyntax-based
rules. May not be significant right now since most rules are still built
with SourceKit, but as we migrate more rules moving forward, this should
make it easier for rule authors to write rules that behave performantly
and correctly.
2022-08-26 14:46:32 +00:00