Update .swiftlint.yml

add lazy var rule to swiftlint
This commit is contained in:
Dmitriy 2021-08-09 11:55:43 +03:00 committed by GitHub
parent cbf10f95f9
commit 5ac9fd8232
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -264,6 +264,12 @@ custom_rules:
regex: 'case[^\n\(]+\([^\)]*(let|var)\s'
message: "Use a let|var keyword behind parentheses"
severity: warning
lazy_var:
name: "Using lazy var"
regex: '(?<!private\(set\)\s)lazy\s+var'
message: "Use lazy var can only with private(set) modifier"
severity: warning
# Rx