Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIViewController viewIsAppearing is not supported by type_contents_order rule #5259

Closed
2 tasks done
way-to-code opened this issue Oct 3, 2023 · 0 comments · Fixed by #5316
Closed
2 tasks done

UIViewController viewIsAppearing is not supported by type_contents_order rule #5259

way-to-code opened this issue Oct 3, 2023 · 0 comments · Fixed by #5316
Labels
enhancement Ideas for improvements of existing features and rules. good first issue Issue to be taken up by new contributors yet unfamiliar with the project.

Comments

@way-to-code
Copy link

New Issue Checklist

Describe the bug

Since Xcode 15 SDK Apple introduced a new UIViewController life cycle method viewIsAppearing(_:). The official documentation for the new method can be found here.

As for now type_contents_order rule considers the new method as other_method that is not correct. The new method should be considered as view_life_cycle_method.

Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint lint
Linting Swift files in current working directory
Linting 'ViewController.swift' (1/3)
ViewController.swift:15:14: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'view_life_cycle_method' (type_contents_order)
Done linting! Found 1 violation, 0 serious in 3 files.

Environment

  • SwiftLint version: 0.53.0
  • Installation method used: pkg file
  • Configuration file:
only_rules:
    - type_contents_order
  • Are you using nested configurations?
    No

  • Which Xcode version are you using (check xcodebuild -version)?
    Xcode 15.0 Build version 15A240d

  • Do you have a sample that shows the issue?

    final class ViewController: UIViewController {
        override func viewDidLoad() {
            super.viewDidLoad()
        }
        
        override func viewIsAppearing(_ animated: Bool) {
            super.viewIsAppearing(animated)
        }
        
        override func viewDidAppear(_ animated: Bool) {
            super.viewDidAppear(animated)
        }
    }
@SimplyDanny SimplyDanny added bug Unexpected and reproducible misbehavior. good first issue Issue to be taken up by new contributors yet unfamiliar with the project. enhancement Ideas for improvements of existing features and rules. and removed bug Unexpected and reproducible misbehavior. labels Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Ideas for improvements of existing features and rules. good first issue Issue to be taken up by new contributors yet unfamiliar with the project.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants