From 2c915edc855bddf27aa63bc43dc6664e053360b8 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Wed, 26 Dec 2018 18:26:40 +0300 Subject: [PATCH 1/2] add new swiftlint rules --- xcode/.swiftlint.yml | 79 +++++++++++++++++++++++++++++--------------- 1 file changed, 53 insertions(+), 26 deletions(-) diff --git a/xcode/.swiftlint.yml b/xcode/.swiftlint.yml index 9411422..b4a11c4 100644 --- a/xcode/.swiftlint.yml +++ b/xcode/.swiftlint.yml @@ -1,36 +1,63 @@ opt_in_rules: + + # performance + + - first_where + - last_where + - empty_string + - empty_count + + # idiomatic + + - legacy_random + - pattern_matching_keywords + - redundant_nil_coalescing + - redundant_type_annotation + - static_operator + - toggle_bool + - joined_default_parameter + - implicitly_unwrapped_optional + - convenience_type + - object_literal + - force_unwrapping + - force_cast + - force_try + - fatal_error_message + - extension_access_modifier + - explicit_init + + # style + + - literal_expression_end_indentation + - multiline_arguments_brackets + - multiline_function_chains + - multiline_literal_brackets + - multiline_parameters + - multiline_parameters_brackets + - operator_usage_whitespace + - sorted_imports # check me! + - switch_case_on_newline + - unneeded_parentheses_in_closure_argument + - vertical_parameter_alignment_on_call + - vertical_whitespace_between_cases + - vertical_whitespace_closing_braces + - yoda_condition + - number_separator + - let_var_whitespace + - implicit_return + - conditional_returns_on_newline - closure_spacing - closure_end_indentation - - conditional_returns_on_newline - - empty_count - - explicit_init - - extension_access_modifier - - - fatal_error_message - - first_where - - force_unwrapping - - - implicit_return - - - let_var_whitespace - - - multiline_parameters - - - nimble_operator - discuss - - number_separator - - - object_literal - - overridden_super_call + # lint + - private_action - private_outlet - prohibited_super_call - - - redundant_nil_coalescing - - - unneeded_parentheses_in_closure_argument - - - vertical_parameter_alignment_on_call + - unused_import # check me! + - unused_private_declaration + - identical_operands + - overridden_super_call excluded: - Carthage From 779b0cabcb92e046b6b1c6bd0493f4764727dced Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Wed, 26 Dec 2018 18:52:12 +0300 Subject: [PATCH 2/2] remove sorted_imports --- xcode/.swiftlint.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xcode/.swiftlint.yml b/xcode/.swiftlint.yml index b4a11c4..2363ba4 100644 --- a/xcode/.swiftlint.yml +++ b/xcode/.swiftlint.yml @@ -35,7 +35,6 @@ opt_in_rules: - multiline_parameters - multiline_parameters_brackets - operator_usage_whitespace - - sorted_imports # check me! - switch_case_on_newline - unneeded_parentheses_in_closure_argument - vertical_parameter_alignment_on_call @@ -54,7 +53,7 @@ opt_in_rules: - private_action - private_outlet - prohibited_super_call - - unused_import # check me! + - unused_import - unused_private_declaration - identical_operands - overridden_super_call