mirror of
https://github.com/realm/SwiftLint.git
synced 2026-06-06 20:18:40 +00:00
e320b2e363
Now that the Configuration struct is creating a list of rules based on optional yaml, this list duplicates the same behavior. By removing it you no longer have to maintain duplicate lists of rules.
23 lines
507 B
Swift
23 lines
507 B
Swift
//
|
|
// Rule.swift
|
|
// SwiftLint
|
|
//
|
|
// Created by JP Simard on 2015-05-16.
|
|
// Copyright (c) 2015 Realm. All rights reserved.
|
|
//
|
|
|
|
import SourceKittenFramework
|
|
|
|
public protocol Rule {
|
|
init()
|
|
var identifier: String { get }
|
|
func validateFile(file: File) -> [StyleViolation]
|
|
var example: RuleExample { get }
|
|
}
|
|
|
|
public protocol ParameterizedRule: Rule {
|
|
typealias ParameterType
|
|
init(parameters: [RuleParameter<ParameterType>])
|
|
var parameters: [RuleParameter<ParameterType>] { get }
|
|
}
|