Merge pull request #241 from TouchInstinct/feature/guard_self_linter

Add strong self rule
This commit is contained in:
Loupehope 2020-12-30 14:49:09 +03:00 committed by GitHub
commit 659baf6ced
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

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