From a264c319c249963123f5375f8ac60de08dd0440c Mon Sep 17 00:00:00 2001 From: Vlad Date: Fri, 18 Sep 2020 13:19:47 +0300 Subject: [PATCH] Add strong self rule --- xcode/.swiftlint.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xcode/.swiftlint.yml b/xcode/.swiftlint.yml index 40a41b4..6861432 100644 --- a/xcode/.swiftlint.yml +++ b/xcode/.swiftlint.yml @@ -251,6 +251,12 @@ custom_rules: message: "The parameter name is actually used in the function name. Use _ instead." severity: error + strong_self: + name: "Strong self" + regex: 'guard[\s\S]*= *self[\s\S]*else' + message: "Use a local function with `weak self` instead of `strong self`." + severity: error + # Rx unused_map_parameter: