diff --git a/Source/SwiftLintBuiltInRules/Rules/Lint/UnusedDeclarationRule.swift b/Source/SwiftLintBuiltInRules/Rules/Lint/UnusedDeclarationRule.swift index 4820a6b35e..bf49949690 100644 --- a/Source/SwiftLintBuiltInRules/Rules/Lint/UnusedDeclarationRule.swift +++ b/Source/SwiftLintBuiltInRules/Rules/Lint/UnusedDeclarationRule.swift @@ -313,6 +313,7 @@ private let declarationKindsToSkip: Set = [ ] private let declarationAttributesToSkip: Set = [ + .ibsegueaction, .ibaction, .main, .nsApplicationMain, diff --git a/Source/SwiftLintBuiltInRules/Rules/RuleConfigurations/TypeContentsOrderConfiguration.swift b/Source/SwiftLintBuiltInRules/Rules/RuleConfigurations/TypeContentsOrderConfiguration.swift index 811622d0f7..a41ee40e16 100644 --- a/Source/SwiftLintBuiltInRules/Rules/RuleConfigurations/TypeContentsOrderConfiguration.swift +++ b/Source/SwiftLintBuiltInRules/Rules/RuleConfigurations/TypeContentsOrderConfiguration.swift @@ -17,6 +17,7 @@ enum TypeContent: String { case otherMethod = "other_method" case `subscript` = "subscript" case deinitializer = "deinitializer" + case ibSegueAction = "ib_segue_action" } @AutoApply diff --git a/Source/SwiftLintBuiltInRules/Rules/Style/TypeContentsOrderRule.swift b/Source/SwiftLintBuiltInRules/Rules/Style/TypeContentsOrderRule.swift index 57f4082adf..254bc8e9f6 100644 --- a/Source/SwiftLintBuiltInRules/Rules/Style/TypeContentsOrderRule.swift +++ b/Source/SwiftLintBuiltInRules/Rules/Style/TypeContentsOrderRule.swift @@ -133,6 +133,9 @@ struct TypeContentsOrderRule: OptInRule { if typeContentStructure.enclosedSwiftAttributes.contains(SwiftDeclarationAttributeKind.ibaction) { return .ibAction } + if typeContentStructure.enclosedSwiftAttributes.contains(SwiftDeclarationAttributeKind.ibsegueaction) { + return .ibSegueAction + } return .otherMethod case .functionSubscript: diff --git a/Source/SwiftLintCore/Extensions/SwiftDeclarationAttributeKind+Swiftlint.swift b/Source/SwiftLintCore/Extensions/SwiftDeclarationAttributeKind+Swiftlint.swift index ace97f9a29..0eeaae8813 100644 --- a/Source/SwiftLintCore/Extensions/SwiftDeclarationAttributeKind+Swiftlint.swift +++ b/Source/SwiftLintCore/Extensions/SwiftDeclarationAttributeKind+Swiftlint.swift @@ -85,6 +85,7 @@ public extension SwiftDeclarationAttributeKind { .nonobjc, .objcMembers, .ibaction, + .ibsegueaction, .iboutlet, .ibdesignable, .ibinspectable,