From c5b08186d01ea743c1b9b0b8d6e152d739383736 Mon Sep 17 00:00:00 2001 From: Vlad Date: Fri, 15 May 2020 14:35:16 +0300 Subject: [PATCH 1/2] Fix check for number variables --- xcode/.swiftlint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xcode/.swiftlint.yml b/xcode/.swiftlint.yml index ed33b63..f542f6d 100644 --- a/xcode/.swiftlint.yml +++ b/xcode/.swiftlint.yml @@ -229,7 +229,7 @@ custom_rules: single_line_closure: name: "Single line closure" - regex: '\{([^\n]*\[[^\]]+\][^\n]*)?([^\n]*[a-zA-Z]+(, (_|[a-zA-Z]+))*)? in [^\n]+' + regex: '\{([^\n]*\[[^\]]+\][^\n]*)?([^\n]*[a-zA-Z]\w*(, \w+)*)? in [^\n]+' message: "Too complex expression for single line closure. Improve readability by making it multiline." severity: error From 861bb95a057a13480eefa5e46fd47ca9c3111532 Mon Sep 17 00:00:00 2001 From: Vlad Date: Fri, 15 May 2020 14:48:32 +0300 Subject: [PATCH 2/2] Fix comments check --- xcode/.swiftlint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xcode/.swiftlint.yml b/xcode/.swiftlint.yml index f542f6d..5b743a1 100644 --- a/xcode/.swiftlint.yml +++ b/xcode/.swiftlint.yml @@ -229,7 +229,7 @@ custom_rules: single_line_closure: name: "Single line closure" - regex: '\{([^\n]*\[[^\]]+\][^\n]*)?([^\n]*[a-zA-Z]\w*(, \w+)*)? in [^\n]+' + regex: '\{([^\n\/]*\[[^\]]+\][^\n\/]*)?([^\n\/]*[a-zA-Z]\w*(, \w+)*)? in [^\n\/]+' message: "Too complex expression for single line closure. Improve readability by making it multiline." severity: error