From 0e0e66775e3a82c3767623aba251f98526fe94f4 Mon Sep 17 00:00:00 2001 From: Vlad Date: Fri, 5 Jun 2020 12:34:49 +0300 Subject: [PATCH] Add new rule --- xcode/.swiftlint.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xcode/.swiftlint.yml b/xcode/.swiftlint.yml index 3fc2c03..7a89f38 100644 --- a/xcode/.swiftlint.yml +++ b/xcode/.swiftlint.yml @@ -242,7 +242,13 @@ custom_rules: redundant_type_annotation_bool: name: "Redundant type annotation for Bool" regex: '((var|let)) *\w+ *((: *Bool *=)|((\w| |<|>|:)*= *BehaviorRelay\( *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*(\w+)(<.+>)?\((?i)\1' + message: "The parameter name is actually used in the function name. Use _ instead." severity: error # Rx