From db8cd599b3c1c605d20df6050ea79050267b6b52 Mon Sep 17 00:00:00 2001 From: Vlad Date: Wed, 30 Dec 2020 14:20:10 +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 caa2386..35c417c 100644 --- a/xcode/.swiftlint.yml +++ b/xcode/.swiftlint.yml @@ -278,6 +278,12 @@ custom_rules: message: "Use `ParameterClosure` instead of declaring an explicit return value of `Void`." severity: error + strong_self: + name: "Strong self" + regex: '(if|guard)\s+let\s+self\s+=\s+self' + message: "Use a local function instead of capture strong self" + severity: error + # Rx unused_map_parameter: