Skip to content

Commit

Permalink
Added viewIsAppearing in viewLifecycleMethodNames (#5316)
Browse files Browse the repository at this point in the history
  • Loading branch information
u-abyss authored Nov 1, 2023
1 parent 48604d3 commit 6dc4b86
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
* Rewrite `duplicate_imports` rule using SwiftSyntax.
[JP Simard](https://github.com/jpsim)

* Handle `viewIsAppearing` in the `type_contents_order` rule.
[u-abyss](https://github.com/u-abyss)
[#5259](https://github.com/realm/SwiftLint/issues/5259)

#### Bug Fixes

* Fix correction of `explicit_init` rule by keeping significant trivia.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ struct TypeContentsOrderRule: OptInRule {
let viewLifecycleMethodNames = [
"loadView(",
"loadViewIfNeeded(",
"viewIsAppearing(",
"viewDidLoad(",
"viewWillAppear(",
"viewWillLayoutSubviews(",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ internal struct TypeContentsOrderRuleExamples {
view2.layoutIfNeeded()
hasLayoutedView2 = true
}
override func viewIsAppearing(_ animated: Bool) {
super.viewIsAppearing(animated)
}
""",
"""
// IBActions
Expand Down

0 comments on commit 6dc4b86

Please sign in to comment.