Merge pull request #192 from TouchInstinct/feature/contentView_in_cell_lint

addSubview in cell lint
This commit is contained in:
Loupehope 2020-05-21 15:42:43 +03:00 committed by GitHub
commit 8e13f2e025
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -233,6 +233,12 @@ custom_rules:
message: "Too complex expression for single line closure. Improve readability by making it multiline."
severity: error
addSubview_in_cell:
name: "Usage addSubview in cell"
regex: '(extension|class)\s*\w+Cell(:| )(?s).*(self\.|\s{2,})add(Subv|V)iews?\(\w'
message: "Use сontentView instead of self for addSubview or addSubviews methods in cell."
severity: error
# Rx
unused_map_parameter: