From 6fd3c16cc436a4013ff9c77271fca7cfd5f9face Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josip=20=C4=86avar?= Date: Wed, 19 Mar 2025 12:47:47 +0100 Subject: [PATCH 1/3] Add a .init SwiftLint custom rule This rule prevents the use of implicit .init which makes code navigation and readability more difficult --- .swiftlint.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.swiftlint.yml b/.swiftlint.yml index 5a6a8ab..752b0ba 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -182,3 +182,14 @@ number_separator: type_body_length: warning: 300 error: 450 + +opt_in_rules: + - custom_rules + - type_inferred_init + +custom_rules: + type_inferred_init: + name: "Type inferred init" + regex: "(? Date: Wed, 19 Mar 2025 12:51:57 +0100 Subject: [PATCH 2/3] Update .swiftlint.yml --- .swiftlint.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.swiftlint.yml b/.swiftlint.yml index 752b0ba..1f4f9d9 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -135,6 +135,7 @@ only_rules: - void_return - weak_delegate - yoda_condition + - type_inferred_init file_length: warning: 600 @@ -183,10 +184,6 @@ type_body_length: warning: 300 error: 450 -opt_in_rules: - - custom_rules - - type_inferred_init - custom_rules: type_inferred_init: name: "Type inferred init" From cddca770b6b54bdc99f0df6bd15120a9da85a7e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josip=20=C4=86avar?= Date: Wed, 19 Mar 2025 12:58:07 +0100 Subject: [PATCH 3/3] Update .swiftlint.yml --- .swiftlint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.swiftlint.yml b/.swiftlint.yml index 1f4f9d9..19ba15b 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -135,6 +135,7 @@ only_rules: - void_return - weak_delegate - yoda_condition + - custom_rules - type_inferred_init file_length: