Files
SwiftLint/Source/SwiftLintFramework/Rules/Metrics/FunctionBodyLengthRule.swift
T
JP SimardandGitHub 4bd7da32ea Reduce visibility of rules to be internal (#4533)
There's no reason to expose these publicly and this will make it nicer
to move to a new module outside of the core SwiftLint functionality.
2022-11-09 11:01:26 -05:00

17 lines
568 B
Swift

struct FunctionBodyLengthRule: SwiftSyntaxRule, ConfigurationProviderRule {
var configuration = SeverityLevelsConfiguration(warning: 50, error: 100)
init() {}
static let description = RuleDescription(
identifier: "function_body_length",
name: "Function Body Length",
description: "Functions bodies should not span too many lines.",
kind: .metrics
)
func makeVisitor(file: SwiftLintFile) -> ViolationsSyntaxVisitor {
BodyLengthRuleVisitor(kind: .function, file: file, configuration: configuration)
}
}