mirror of
https://github.com/realm/SwiftLint.git
synced 2026-06-06 20:18:40 +00:00
45 lines
1.8 KiB
Swift
45 lines
1.8 KiB
Swift
//
|
|
// RuleDescription+Examples.swift
|
|
// SwiftLint
|
|
//
|
|
// Created by Marcelo Fabri on 02/07/17.
|
|
// Copyright © 2017 Realm. All rights reserved.
|
|
//
|
|
|
|
import SwiftLintFramework
|
|
|
|
extension RuleDescription {
|
|
func with(nonTriggeringExamples: [String]) -> RuleDescription {
|
|
return RuleDescription(identifier: identifier,
|
|
name: name,
|
|
description: description,
|
|
kind: kind,
|
|
nonTriggeringExamples: nonTriggeringExamples,
|
|
triggeringExamples: triggeringExamples,
|
|
corrections: corrections,
|
|
deprecatedAliases: deprecatedAliases)
|
|
}
|
|
|
|
func with(triggeringExamples: [String]) -> RuleDescription {
|
|
return RuleDescription(identifier: identifier,
|
|
name: name,
|
|
description: description,
|
|
kind: kind,
|
|
nonTriggeringExamples: nonTriggeringExamples,
|
|
triggeringExamples: triggeringExamples,
|
|
corrections: corrections,
|
|
deprecatedAliases: deprecatedAliases)
|
|
}
|
|
|
|
func with(corrections: [String: String]) -> RuleDescription {
|
|
return RuleDescription(identifier: identifier,
|
|
name: name,
|
|
description: description,
|
|
kind: kind,
|
|
nonTriggeringExamples: nonTriggeringExamples,
|
|
triggeringExamples: triggeringExamples,
|
|
corrections: corrections,
|
|
deprecatedAliases: deprecatedAliases)
|
|
}
|
|
}
|