Update SwiftSyntaxRule.swift (#4749)
This commit is contained in:
parent
0163ffd328
commit
60d0dd8a05
|
@ -19,9 +19,10 @@ public protocol SwiftSyntaxRule: SourceKitFreeRule {
|
|||
|
||||
/// Gives a chance for the rule to do some pre-processing on the syntax tree.
|
||||
/// One typical example is using `SwiftOperators` to "fold" the tree, resolving operators precedence.
|
||||
/// By default, it just returns the same `syntaxTree`.
|
||||
/// This can also be used to skip validation in a given file.
|
||||
/// By default, it just returns the file's `syntaxTree`.
|
||||
///
|
||||
/// - parameter syntaxTree: The syntax tree to run pre-processing on
|
||||
/// - parameter file: The file to run pre-processing on.
|
||||
///
|
||||
/// - returns: The tree that will be used to check for violations. If `nil`, this rule will return no violations.
|
||||
func preprocess(file: SwiftLintFile) -> SourceFileSyntax?
|
||||
|
|
Loading…
Reference in New Issue