Skip to content
New issue

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

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

Already on GitHub? # to your account

Rule: Methods calling super that should not #970

Closed
ghost opened this issue Dec 12, 2016 · 4 comments
Closed

Rule: Methods calling super that should not #970

ghost opened this issue Dec 12, 2016 · 4 comments
Labels
rule-request Requests for a new rules.

Comments

@ghost
Copy link

ghost commented Dec 12, 2016

Some of Apple's methods should not call super when overriden, according to their documentation. These methods should be flagged. Example:

class foo: UIViewController {
  override func loadView() {
    super.loadView() // <- Should be flagged
  }
}
@marcelofabri marcelofabri added the rule-request Requests for a new rules. label Dec 12, 2016
@marcelofabri
Copy link
Collaborator

Do you have other examples? We'd need to keep a list of blacklisted methods, similar to https://github.com/realm/SwiftLint/blob/0.13.2/Source/SwiftLintFramework/Rules/RuleConfigurations/OverridenSuperCallConfiguration.swift#L12

@ghost
Copy link
Author

ghost commented Dec 12, 2016

@marcelofabri Yep! Readying my PR. 😄

@marcelofabri
Copy link
Collaborator

That was fast 🚀

@ghost ghost mentioned this issue Dec 12, 2016
@ghost
Copy link
Author

ghost commented Dec 12, 2016

@marcelofabri I saw the need for it and saw it was an "easy" PR. So I wrote the PR and went back and raised the issue. PR is #971.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
rule-request Requests for a new rules.
Projects
None yet
Development

No branches or pull requests

1 participant