forked from realm/SwiftLint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
IdentifierNameRuleExamples.swift
40 lines (37 loc) · 1.26 KB
/
IdentifierNameRuleExamples.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// IdentifierNameRuleExamples.swift
// SwiftLint
//
// Created by Marcelo Fabri on 12/30/16.
// Copyright © 2016 Realm. All rights reserved.
//
import Foundation
internal struct IdentifierNameRuleExamples {
static let nonTriggeringExamples = [
"let myLet = 0",
"var myVar = 0",
"private let _myLet = 0",
"class Abc { static let MyLet = 0 }",
"let URL: NSURL? = nil",
"let XMLString: String? = nil",
"override var i = 0",
"enum Foo { case myEnum }",
"func isOperator(name: String) -> Bool",
"func typeForKind(_ kind: SwiftDeclarationKind) -> String",
"func == (lhs: SyntaxToken, rhs: SyntaxToken) -> Bool",
"override func IsOperator(name: String) -> Bool"
]
static let triggeringExamples = [
"↓let MyLet = 0",
"↓let _myLet = 0",
"private ↓let myLet_ = 0",
"↓let myExtremelyVeryVeryVeryVeryVeryVeryLongLet = 0",
"↓var myExtremelyVeryVeryVeryVeryVeryVeryLongVar = 0",
"private ↓let _myExtremelyVeryVeryVeryVeryVeryVeryLongLet = 0",
"↓let i = 0",
"↓var id = 0",
"private ↓let _i = 0",
"↓func IsOperator(name: String) -> Bool",
"enum Foo { case ↓MyEnum }"
]
}