mirror of
https://github.com/realm/SwiftLint.git
synced 2026-06-06 20:18:40 +00:00
remove init() from Rule.
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
##### Breaking
|
||||
|
||||
* None.
|
||||
* `init()` is no longer a member of the `Rule` protocol.
|
||||
|
||||
##### Enhancements
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
import SourceKittenFramework
|
||||
|
||||
public protocol Rule {
|
||||
init()
|
||||
static var description: RuleDescription { get }
|
||||
func validateFile(file: File) -> [StyleViolation]
|
||||
}
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
import SourceKittenFramework
|
||||
|
||||
public struct ColonRule: Rule {
|
||||
public init() {}
|
||||
|
||||
public static let description = RuleDescription(
|
||||
identifier: "colon",
|
||||
name: "Colon",
|
||||
|
||||
@@ -10,8 +10,6 @@ import Foundation
|
||||
import SourceKittenFramework
|
||||
|
||||
public struct CommaRule: Rule {
|
||||
public init() {}
|
||||
|
||||
public static let description = RuleDescription(
|
||||
identifier: "comma",
|
||||
name: "Comma Spacing",
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
import SourceKittenFramework
|
||||
|
||||
public struct ControlStatementRule: Rule {
|
||||
public init() {}
|
||||
|
||||
public static let description = RuleDescription(
|
||||
identifier: "control_statement",
|
||||
name: "Control Statement",
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
import SourceKittenFramework
|
||||
|
||||
public struct ForceCastRule: Rule {
|
||||
public init() {}
|
||||
|
||||
public static let description = RuleDescription(
|
||||
identifier: "force_cast",
|
||||
name: "Force Cast",
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
import SourceKittenFramework
|
||||
|
||||
public struct ForceTryRule: Rule {
|
||||
public init() {}
|
||||
|
||||
public static let description = RuleDescription(
|
||||
identifier: "force_try",
|
||||
name: "Force Try",
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
import SourceKittenFramework
|
||||
|
||||
public struct LeadingWhitespaceRule: Rule {
|
||||
public init() {}
|
||||
|
||||
public static let description = RuleDescription(
|
||||
identifier: "leading_whitespace",
|
||||
name: "Leading Whitespace",
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
import SourceKittenFramework
|
||||
|
||||
public struct LegacyConstructorRule: Rule {
|
||||
public init() {}
|
||||
|
||||
public static let description = RuleDescription(
|
||||
identifier: "legacy_constructor",
|
||||
name: "Legacy Constructor",
|
||||
|
||||
@@ -10,8 +10,6 @@ import SourceKittenFramework
|
||||
import SwiftXPC
|
||||
|
||||
public struct NestingRule: ASTRule {
|
||||
public init() {}
|
||||
|
||||
public static let description = RuleDescription(
|
||||
identifier: "nesting",
|
||||
name: "Nesting",
|
||||
|
||||
@@ -10,8 +10,6 @@ import Foundation
|
||||
import SourceKittenFramework
|
||||
|
||||
public struct OpeningBraceRule: Rule {
|
||||
public init() {}
|
||||
|
||||
public static let description = RuleDescription(
|
||||
identifier: "opening_brace",
|
||||
name: "Opening Brace Spacing",
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
import SourceKittenFramework
|
||||
|
||||
public struct OperatorFunctionWhitespaceRule: Rule {
|
||||
public init() {}
|
||||
|
||||
public static let description = RuleDescription(
|
||||
identifier: "operator_whitespace",
|
||||
name: "Operator Function Whitespace",
|
||||
|
||||
@@ -10,8 +10,6 @@ import Foundation
|
||||
import SourceKittenFramework
|
||||
|
||||
public struct ReturnArrowWhitespaceRule: Rule {
|
||||
public init() {}
|
||||
|
||||
public static let description = RuleDescription(
|
||||
identifier: "return_arrow_whitespace",
|
||||
name: "Returning Whitespace",
|
||||
|
||||
@@ -10,8 +10,6 @@ import Foundation
|
||||
import SourceKittenFramework
|
||||
|
||||
public struct StatementPositionRule: Rule {
|
||||
public init() {}
|
||||
|
||||
public static let description = RuleDescription(
|
||||
identifier: "statement_position",
|
||||
name: "Statement Position",
|
||||
|
||||
@@ -16,8 +16,6 @@ extension SyntaxKind {
|
||||
}
|
||||
|
||||
public struct TodoRule: Rule {
|
||||
public init() {}
|
||||
|
||||
public static let description = RuleDescription(
|
||||
identifier: "todo",
|
||||
name: "Todo",
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
import SourceKittenFramework
|
||||
|
||||
public struct TrailingNewlineRule: Rule {
|
||||
public init() {}
|
||||
|
||||
public static let description = RuleDescription(
|
||||
identifier: "trailing_newline",
|
||||
name: "Trailing Newline",
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
import SourceKittenFramework
|
||||
|
||||
public struct TrailingSemicolonRule: Rule {
|
||||
public init() {}
|
||||
|
||||
public static let description = RuleDescription(
|
||||
identifier: "trailing_semicolon",
|
||||
name: "Trailing Semicolon",
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
import SourceKittenFramework
|
||||
|
||||
public struct TrailingWhitespaceRule: Rule {
|
||||
public init() {}
|
||||
|
||||
public static let description = RuleDescription(
|
||||
identifier: "trailing_whitespace",
|
||||
name: "Trailing Whitespace",
|
||||
|
||||
@@ -10,8 +10,6 @@ import SourceKittenFramework
|
||||
import SwiftXPC
|
||||
|
||||
public struct TypeNameRule: ASTRule {
|
||||
public init() {}
|
||||
|
||||
public static let description = RuleDescription(
|
||||
identifier: "type_name",
|
||||
name: "Type Name",
|
||||
|
||||
@@ -10,8 +10,6 @@ import SourceKittenFramework
|
||||
import SwiftXPC
|
||||
|
||||
public struct VariableNameRule: ASTRule {
|
||||
public init() {}
|
||||
|
||||
public static let description = RuleDescription(
|
||||
identifier: "variable_name",
|
||||
name: "Variable Name",
|
||||
|
||||
Reference in New Issue
Block a user