mirror of
https://github.com/realm/SwiftLint.git
synced 2026-06-06 20:18:40 +00:00
Added exclusions to TypeNameRule.
This commit is contained in:
@@ -48,7 +48,7 @@ public struct TypeNameRule: ASTRule, ConfigProviderRule {
|
||||
if !typeKinds.contains(kind) {
|
||||
return []
|
||||
}
|
||||
if let name = dictionary["key.name"] as? String,
|
||||
if let name = dictionary["key.name"] as? String where !config.excluded.contains(name),
|
||||
let offset = (dictionary["key.offset"] as? Int64).flatMap({ Int($0) }) {
|
||||
let name = name.nameStrippingLeadingUnderscoreIfPrivate(dictionary)
|
||||
let nameCharacterSet = NSCharacterSet(charactersInString: name)
|
||||
|
||||
Reference in New Issue
Block a user