Add strong self rule

This commit is contained in:
Vlad 2020-09-18 13:19:47 +03:00
parent 7a590fd046
commit a264c319c2
1 changed files with 6 additions and 0 deletions

View File

@ -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: