Skip to content

Commit 46d7c6c

Browse files
Use disable/enable style for identifier_name rule (#451)
1 parent 59c54ff commit 46d7c6c

7 files changed

+35
-7
lines changed

Sources/Nodes/ViewControllable/UIKit/NavigationControllable/NavigationControllable.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,14 @@ public protocol NavigationControllable: ViewControllable {
3737
/// - animated: A Boolean value specifying whether the navigation stack transition is animated.
3838
func pop(_ viewController: ViewControllable, animated: Bool)
3939

40+
// swiftlint:disable identifier_name
41+
4042
/// Returns `self` as a ``UINavigationController``.
4143
///
4244
/// - Returns: The `self` instance as a ``UINavigationController``.
43-
func _asUINavigationController() -> UINavigationController // swiftlint:disable:this identifier_name
45+
func _asUINavigationController() -> UINavigationController
46+
47+
// swiftlint:enable identifier_name
4448
}
4549

4650
#endif

Sources/Nodes/ViewControllable/UIKit/NavigationControllable/UINavigationController+NavigationControllable.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,16 @@ extension UINavigationController: NavigationControllable {
4545
popViewController(animated: animated)
4646
}
4747

48+
// swiftlint:disable identifier_name
49+
4850
/// Returns `self` as a ``UINavigationController``.
4951
///
5052
/// - Returns: The `self` instance as a ``UINavigationController``.
51-
public func _asUINavigationController() -> UINavigationController { // swiftlint:disable:this identifier_name
53+
public func _asUINavigationController() -> UINavigationController {
5254
self
5355
}
56+
57+
// swiftlint:enable identifier_name
5458
}
5559

5660
#endif

Sources/Nodes/ViewControllable/UIKit/TabBarControllable/TabBarControllable.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,14 @@ public protocol TabBarControllable: ViewControllable {
2626
animated: Bool
2727
)
2828

29+
// swiftlint:disable identifier_name
30+
2931
/// Returns `self` as a ``UITabBarController``.
3032
///
3133
/// - Returns: The `self` instance as a ``UITabBarController``.
32-
func _asUITabBarController() -> UITabBarController // swiftlint:disable:this identifier_name
34+
func _asUITabBarController() -> UITabBarController
35+
36+
// swiftlint:enable identifier_name
3337
}
3438

3539
#endif

Sources/Nodes/ViewControllable/UIKit/TabBarControllable/UITabBarController+TabBarControllable.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,16 @@ extension UITabBarController: TabBarControllable {
2626
setViewControllers(viewControllers?.map { $0._asUIViewController() }, animated: animated)
2727
}
2828

29+
// swiftlint:disable identifier_name
30+
2931
/// Returns `self` as a ``UITabBarController``.
3032
///
3133
/// - Returns: The `self` instance as a ``UITabBarController``.
32-
public func _asUITabBarController() -> UITabBarController { // swiftlint:disable:this identifier_name
34+
public func _asUITabBarController() -> UITabBarController {
3335
self
3436
}
37+
38+
// swiftlint:enable identifier_name
3539
}
3640

3741
#endif

Sources/Nodes/ViewControllable/UIKit/UIViewController+ModalStyle.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,19 @@ public struct ModalStyle {
150150
allowInteractiveDismissal: false)
151151
}
152152

153+
// swiftlint:disable identifier_name
154+
153155
/// DEPRECATED - DO NOT USE
154-
public func _withAdditionalConfiguration( // swiftlint:disable:this identifier_name
156+
public func _withAdditionalConfiguration(
155157
configuration additionalConfiguration: @escaping (ViewControllable) -> Void
156158
) -> Self {
157159
Self(behavior: behavior,
158160
controlStatusBarAppearance: controlStatusBarAppearance,
159161
allowInteractiveDismissal: allowInteractiveDismissal,
160162
configuration: configuration + [additionalConfiguration])
161163
}
164+
165+
// swiftlint:enable identifier_name
162166
}
163167

164168
extension UIViewController {

Sources/Nodes/ViewControllable/UIKit/UIViewController+ViewControllable.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,16 @@ extension UIViewController: ViewControllable {
6868
_removeChild(viewController)
6969
}
7070

71+
// swiftlint:disable identifier_name
72+
7173
/// Returns `self` as a ``UIViewController``.
7274
///
7375
/// - Returns: The `self` instance as a ``UIViewController``.
74-
public func _asUIViewController() -> UIViewController { // swiftlint:disable:this identifier_name
76+
public func _asUIViewController() -> UIViewController {
7577
self
7678
}
79+
80+
// swiftlint:enable identifier_name
7781
}
7882

7983
#endif

Sources/Nodes/ViewControllable/ViewControllable.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,14 @@ public protocol ViewControllable: AnyObject {
6363
/// - Parameter viewController: The ``ViewControllable`` instance to uncontain.
6464
func uncontain(_ viewController: ViewControllable)
6565

66+
// swiftlint:disable identifier_name
67+
6668
/// Returns `self` as a ``UIViewController``.
6769
///
6870
/// - Returns: The `self` instance as a ``UIViewController``.
69-
func _asUIViewController() -> UIViewController // swiftlint:disable:this identifier_name
71+
func _asUIViewController() -> UIViewController
72+
73+
// swiftlint:enable identifier_name
7074
}
7175

7276
extension ViewControllable {

0 commit comments

Comments
 (0)