diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e8088b6c9..542931ed47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,10 @@ [riley-williams](https://github.com/riley-williams) [#5958](https://github.com/realm/SwiftLint/issues/5958) +* Add `ib_segue_action` to default configuration of `type_contents_order` rule on the same level as `ib_action` to define and document a standard position. + [SimplyDanny](https://github.com/SimplyDanny) + [#5524](https://github.com/realm/SwiftLint/issues/5524) + ## 0.58.0: New Year’s Fresh Fold #### Breaking diff --git a/Source/SwiftLintBuiltInRules/Rules/RuleConfigurations/TypeContentsOrderConfiguration.swift b/Source/SwiftLintBuiltInRules/Rules/RuleConfigurations/TypeContentsOrderConfiguration.swift index 9587d948b6..645cd52ad8 100644 --- a/Source/SwiftLintBuiltInRules/Rules/RuleConfigurations/TypeContentsOrderConfiguration.swift +++ b/Source/SwiftLintBuiltInRules/Rules/RuleConfigurations/TypeContentsOrderConfiguration.swift @@ -38,7 +38,7 @@ struct TypeContentsOrderConfiguration: SeverityBasedRuleConfiguration { [.initializer], [.typeMethod], [.viewLifeCycleMethod], - [.ibAction], + [.ibAction, .ibSegueAction], [.otherMethod], [.subscript], [.deinitializer], diff --git a/Tests/IntegrationTests/default_rule_configurations.yml b/Tests/IntegrationTests/default_rule_configurations.yml index 76cefae7c2..5d667a9847 100644 --- a/Tests/IntegrationTests/default_rule_configurations.yml +++ b/Tests/IntegrationTests/default_rule_configurations.yml @@ -988,7 +988,7 @@ type_body_length: opt-in: false type_contents_order: severity: warning - order: [[case], [type_alias, associated_type], [subtype], [type_property], [instance_property], [ib_inspectable], [ib_outlet], [initializer], [type_method], [view_life_cycle_method], [ib_action], [other_method], [subscript], [deinitializer]] + order: [[case], [type_alias, associated_type], [subtype], [type_property], [instance_property], [ib_inspectable], [ib_outlet], [initializer], [type_method], [view_life_cycle_method], [ib_action, ib_segue_action], [other_method], [subscript], [deinitializer]] meta: opt-in: true type_name: