You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not sure if there is a place for this in SwiftLint as this looks pretty custom, but I find myself adding scripts to check wether some super calls are made. Most commonly, UIViewController methods like viewDidLoad, viewWillAppear,... require developers to call super, but they tend to forget, resulting in unpredictable errors. Other classes apart from UIViewController might also apply.
The main issue I see here is that sometimes you actually want to override a method to fully replace it, so it should not apply to all override but just a list of predefined ones. Would you like such a rule to be part of SwiftLint? or since it is based on whitelisting methods then you prefer not? we could also add a configuration provider to list the methods to check (based on name).
I definitely think is a useful rule, but maybe not generic enough for Lint
The text was updated successfully, but these errors were encountered:
This method is called before the view controller'��s view is about to be added to a view hierarchy and before any animations are configured for showing the view. You can override this method to perform custom tasks associated with displaying the view. For example, you might use this method to change the orientation or style of the status bar to coordinate with the orientation or style of the view being presented. If you override this method, you must call super at some point in your implementation.
I am not sure if there is a place for this in SwiftLint as this looks pretty custom, but I find myself adding scripts to check wether some
super
calls are made. Most commonly,UIViewController
methods likeviewDidLoad
,viewWillAppear
,... require developers to callsuper
, but they tend to forget, resulting in unpredictable errors. Other classes apart fromUIViewController
might also apply.The main issue I see here is that sometimes you actually want to override a method to fully replace it, so it should not apply to all
override
but just a list of predefined ones. Would you like such a rule to be part of SwiftLint? or since it is based on whitelisting methods then you prefer not? we could also add a configuration provider to list the methods to check (based on name).I definitely think is a useful rule, but maybe not generic enough for Lint
The text was updated successfully, but these errors were encountered: