Merge pull request #198 from TouchInstinct/feature/lint_func_check

Parameter repetition
This commit is contained in:
Loupehope 2020-06-05 14:05:27 +03:00 committed by GitHub
commit 777aaf9ea9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -242,7 +242,13 @@ custom_rules:
redundant_type_annotation_bool:
name: "Redundant type annotation for Bool"
regex: '((var|let)) *\w+ *((: *Bool *=)|((\w| |<|>|:)*= *BehaviorRelay<Bool>\( *value *:)) *((true)|(false))'
message: "Using a type annotation for Bool is redundant"
message: "Using a type annotation for Bool is redundant."
severity: error
parameter_repetition:
name: "Parameter repetition"
regex: 'func ((\w+([A-Z]\w+))|(\w+)) *(<.+>)? *\( *(?i)(\3|\4):'
message: "The parameter name is actually used in the function name. Use _ instead."
severity: error
# Rx