New Issue Checklist
Describe the bug
For a following code in a UIViewController:
override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
viewModel.viewDidDisappear()
}
override func willMove(toParent parent: UIViewController?) {
super.willMove(toParent: parent)
if parent == nil { //detect "Back" tapping
viewModel.willMoveToParent()
}
}
override func viewDidLoad() {
super.viewDidLoad()
configureUI(with: viewModel)
}
the type_contents_order is triggered in willMove(toParent:). This is a lifecycle method, so the rule should not be triggered.
Environment
- SwiftLint version 0.42.0
- Installation method used - CocoaPods
- Xcode 12.2 (12B45b)
- Configuration file:
opt_in_rules:
- type_contents_order
type_contents_order:
excluded: ".*Tests\\.swift"
New Issue Checklist
Describe the bug
For a following code in a
UIViewController:the
type_contents_orderis triggered inwillMove(toParent:). This is a lifecycle method, so the rule should not be triggered.Environment