From a11a78edb655e8a145645e88777b39c907803493 Mon Sep 17 00:00:00 2001 From: Rakuyo Date: Sun, 21 Apr 2024 12:32:12 +0800 Subject: [PATCH] feat: Delete useless files --- .swiftlint.yml | 6 - .swiftlint_rules.yml | 663 ------------------------------------------- 2 files changed, 669 deletions(-) delete mode 100644 .swiftlint.yml delete mode 100644 .swiftlint_rules.yml diff --git a/.swiftlint.yml b/.swiftlint.yml deleted file mode 100644 index 664e04b..0000000 --- a/.swiftlint.yml +++ /dev/null @@ -1,6 +0,0 @@ -parent_config: .swiftlint_rules.yml - -included: - - ./LenticularStickers/Sources - - ./LenticularStickers/Tests - diff --git a/.swiftlint_rules.yml b/.swiftlint_rules.yml deleted file mode 100644 index 80c6502..0000000 --- a/.swiftlint_rules.yml +++ /dev/null @@ -1,663 +0,0 @@ -indentation: 4 - -# rule doc: # https://realm.github.io/SwiftLint/rule_name -only_rules: - - custom_rules - - # warning only - - comment_spacing - - block_based_kvo - - multiple_closures_with_trailing_closure - - notification_center_detachment - - private_over_fileprivate - - private_unit_test - - reduce_boolean - - legacy_random - - legacy_hashing - - is_disjoint - - implicit_getter - - empty_enum_arguments - - deployment_target - - syntactic_sugar - - trailing_newline - - type_body_length - - unused_control_flow_label - - unused_enumerated - - unused_optional_binding - - unused_setter_value - - vertical_whitespace - - void_function_in_ternary - - closure_end_indentation - - duplicate_imports - - compiler_protocol_init - - closure_spacing - - collection_alignment - - convenience_type - - discarded_notification_center_observer - - discouraged_assert - - empty_count - - empty_string - - empty_xctest_method - - extension_access_modifier - - fallthrough - - first_where - - flatmap_over_map_reduce - - identical_operands - - implicitly_unwrapped_optional - - joined_default_parameter - - last_where - - legacy_multiple - - legacy_objc_type - - operator_whitespace - - let_var_whitespace - - multiline_function_chains - - multiline_literal_brackets - - multiline_parameters - - multiline_parameters_brackets - - nimble_operator - - nslocalizedstring_key - - nslocalizedstring_require_bundle - - optional_enum_case_matching - - pattern_matching_keywords - - prefer_self_in_static_references - - prefer_self_type_over_type_of_self - - raw_value_for_camel_cased_codable_enum - - redundant_type_annotation - - private_subject - - single_test_class - - sorted_imports - - test_case_accessibility - - toggle_bool - - typesafe_array_init - - unavailable_function - - untyped_error_in_catch - - vertical_parameter_alignment_on_call - - vertical_whitespace_opening_braces - - weak_delegate - - xct_specific_matcher - - yoda_condition - - discouraged_none_name - - duplicate_conditions - - period_spacing - - blanket_disable_command - - invalid_swiftlint_command - - prohibited_interface_builder - - private_outlet - - direct_return - - superfluous_disable_command - - sorted_enum_cases - - unneeded_synthesized_initializer - - unneeded_override - - # Open this first, and then delete it if you feel it is inappropriate when writing a single test. - - balanced_xctest_lifecycle - - # Open it for now. - # I don’t understand the meaning of this rule at the moment. If it is inappropriate for the project, delete it. - - capture_variable - - # error only - - dynamic_inline - - duplicate_enum_cases - - shorthand_operator - - force_try - - force_cast - - unused_declaration - - unhandled_throwing_task - - # config to error - - class_delegate_protocol - - closing_brace - - closure_parameter_position - - colon - - comma - - computed_accessors_order - - control_statement - - discouraged_direct_init - - duplicated_key_in_dictionary_literal - - empty_parameters - - empty_parentheses_with_trailing_closure - - legacy_cggeometry_functions - - legacy_constant - - legacy_constructor - - legacy_nsgeometry_functions - - mark - - no_space_in_method_call - - nsobject_prefer_isequal - - opening_brace - - protocol_property_accessors_order - - redundant_discardable_let - - redundant_objc_attribute - - redundant_set_access_control - - redundant_void_return - - return_arrow_whitespace - - self_in_property_initialization - - switch_case_alignment - - trailing_semicolon - - unavailable_condition - - unneeded_break_in_switch - - valid_ibinspectable - - vertical_parameter_alignment - - void_return - - xctfail_message - - array_init - - comma_inheritance - - contains_over_filter_count - - contains_over_filter_is_empty - - contains_over_first_not_nil - - contains_over_range_nil_comparison - - empty_collection_literal - - explicit_enum_raw_value - - explicit_init - - fatal_error_message - - file_name_no_space - - force_unwrapping - - literal_expression_end_indentation - - lower_acl_than_parent - - prefer_zero_over_explicit_init - - private_action - - reduce_into - - redundant_nil_coalescing - - return_value_from_void_function - - sorted_first_last - - static_operator - - unowned_variable_capture - - orphaned_doc_comment - - ns_number_init_as_function_reference - - local_doc_comment - - superfluous_else - - non_overridable_class_declaration - - # Complex config - - for_where - - function_body_length - - large_tuple - - line_length - - nesting - - cyclomatic_complexity - - file_length - - function_parameter_count - - generic_type_name - - identifier_name - - type_name - - attributes - - closure_body_length - - enum_case_associated_values_count - - implicit_return - - modifier_order - - multiline_arguments - - number_separator - - operator_usage_whitespace - - overridden_super_call - - self_binding - - unused_import - - type_contents_order - - vertical_whitespace_closing_braces - -custom_rules: - no_objcMembers: - included: ".*.swift" - name: "@objcMembers" - regex: "@objcMembers" - message: "Explicitly use @objc on each member you want to expose to Objective-C" - severity: error - - no_direct_standard_out_logs: - included: ".*.swift" - name: "Writing log messages directly to standard out is disallowed" - regex: "(\\bprint|\\bdebugPrint|\\bdump|Swift\\.print|Swift\\.debugPrint|Swift\\.dump)\\s*\\(" - match_kinds: - - identifier - message: "Don't commit `print(…)`, `debugPrint(…)`, or `dump(…)` as they write to standard out in release. Either log to a dedicated logging system or silence this warning in debug-only scenarios explicitly using `// swiftlint:disable:next no_direct_standard_out_logs`" - severity: warning - - no_hard_coded_strings: - included: ".*.swift" - regex: '^[^#][a-zA-Z0-9][a-zA-Z0-9! ]+' - match_kinds: - - string - message: "Hard coded string is never a good practice" - severity: warning - - empty_braces: - included: ".*.swift" - name: "Empty braces" - regex: '\{(\n\s+)?\}' - message: "Empty braces should be placed on the same line and have one space between." - severity: warning - - use_create_instead_of_make: - included: ".*.swift" - name: "Factory methods naming" - regex: 'func make' - message: "Begin names of factory methods with 'create'" - severity: warning - - already_true: - included: ".*.swift" - regex: "== true" - message: "Don't compare to true, just use the bool value." - severity: error - - already_bool: - included: ".*.swift" - regex: "== false" - message: "Don't compare to false, just use !value." - severity: error - - empty_lines_after_type_declarations: - included: ".*.swift" - name: "Empty lines after type declarations" - regex: '(struct|class|enum|protocol|extension) ([\w]+(:\s*[\w\s,]+)* )\{\n\n' - message: "There should be no empty lines after type declarations" - severity: error - - line_break_after_super: - included: ".*.swift" - regex: '^\ *super\.[^\n]*\n\ *(?!(?:\}))[^\ \n]+' - message: "An empty line after `super.someMethod()` is preferred." - severity: warning - - mark_newlines: - included: ".*.swift" - name: "MARK newlines surrounding" - regex: '(([}{)\w \t]+\n{1}[\t]*)(\/\/ MARK: - [\w ]*))|((\/\/ MARK: - [\w ]*)(\n{1}[ \t]*\w+))' - message: "Every MARK should be surrounded with 1 newline before and 1 after it" - severity: warning - -class_delegate_protocol: - severity: error - -closing_brace: - severity: error - -closure_parameter_position: - severity: error - -colon: - severity: error - -comma: - severity: error - -computed_accessors_order: - severity: error - -control_statement: - severity: error - -discouraged_direct_init: - severity: error - -duplicated_key_in_dictionary_literal: - severity: error - -empty_parameters: - severity: error - -empty_parentheses_with_trailing_closure: - severity: error - -legacy_cggeometry_functions: - severity: error - -legacy_nsgeometry_functions: - severity: error - -legacy_constant: - severity: error - -legacy_constructor: - severity: error - -mark: - severity: error - -no_space_in_method_call: - severity: error - -nsobject_prefer_isequal: - severity: error - -opening_brace: - severity: error - -protocol_property_accessors_order: - severity: error - -redundant_discardable_let: - severity: error - -redundant_objc_attribute: - severity: error - -redundant_set_access_control: - severity: error - -redundant_void_return: - severity: error - -return_arrow_whitespace: - severity: error - -self_in_property_initialization: - severity: error - -switch_case_alignment: - severity: error - -trailing_semicolon: - severity: error - -unavailable_condition: - severity: error - -unneeded_break_in_switch: - severity: error - -valid_ibinspectable: - severity: error - -vertical_parameter_alignment: - severity: error - -void_return: - severity: error - -xctfail_message: - severity: error - -contains_over_filter_count: - severity: error - -contains_over_filter_is_empty: - severity: error - -contains_over_first_not_nil: - severity: error - -contains_over_range_nil_comparison: - severity: error - -empty_collection_literal: - severity: error - -explicit_enum_raw_value: - severity: error - -array_init: - severity: error - -comma_inheritance: - severity: error - -explicit_init: - severity: error - -fatal_error_message: - severity: error - -file_name_no_space: - severity: error - -force_unwrapping: - severity: error - -literal_expression_end_indentation: - severity: error - -lower_acl_than_parent: - severity: error - -prefer_zero_over_explicit_init: - severity: error - -private_action: - severity: error - -reduce_into: - severity: error - -redundant_nil_coalescing: - severity: error - -return_value_from_void_function: - severity: error - -sorted_first_last: - severity: error - -static_operator: - severity: error - -unowned_variable_capture: - severity: error - -orphaned_doc_comment: - severity: error - -ns_number_init_as_function_reference: - severity: error - -local_doc_comment: - severity: error - -superfluous_else: - severity: error - -non_overridable_class_declaration: - severity: error - -self_binding: - bind_identifier: this - -implicit_return: - included: [closure, getter] - -vertical_whitespace_closing_braces: - only_enforce_before_trivial_lines: true - -modifier_order: - preferred_modifier_order: [ - acl, - setterACL, - override, - dynamic, - mutators, - lazy, - final, - required, - convenience, - typeMethods, - owned - ] - -large_tuple: - warning: 3 - error: 4 - -enum_case_associated_values_count: - warning: 6 - error: 7 - -nesting: - type_level: 2 - function_level: 2 - -number_separator: - minimum_length: 5 - minimum_fraction_length: 5 - -for_where: - severity: error - allow_for_as_filter: true - -multiline_arguments: - severity: error - only_enforce_after_first_closure_on_first_line: true - -function_body_length: - warning: 80 - error: 150 - -line_length: - warning: 130 - error: 200 - -closure_body_length: - warning: 30 - error: 60 - -file_length: - warning: 600 - error: 1000 - ignore_comment_only_lines: true - -attributes: - always_on_same_line: [ - "@testable", - "@autoclosure", - "@escaping", - "@Sendable" - ] - always_on_line_above: [ - "@IBOutlet", - "@IBAction", - "@NSManaged", - "@objc", - "@nonobjc", - "@NSManaged", - "@IBInspectable", - "@discardableResult", - "@GKInspectable", - "@Published", - "@SectionModelBuilder", - "@ItemModelBuilder", - "@POST", - "@GET", - "@Atomic", - "@WidgetBundleBuilder", - ] - -type_contents_order: - severity: warning - order: [ - [type_alias, associated_type], - [subtype], - [case], - [type_property], - [instance_property], - [ib_inspectable], - [ib_outlet], - [initializer], - [deinitializer], - [type_method], - [view_life_cycle_method], - [other_method], - [ib_action], - [subscript], - ] - -cyclomatic_complexity: - warning: 20 - error: 30 - ignores_case_statements: false - -function_parameter_count: - warning: 5 - error: 8 - ignores_default_parameters: true - -operator_usage_whitespace: - lines_look_around: 2 - skip_aligned_constants: false - allowed_no_space_operators: [] - -unused_import: - require_explicit_imports: true - allowed_transitive_imports: [] - always_keep_imports: [] - -overridden_super_call: - severity: error - excluded: [] - included: [ - "viewWillAppear", - "viewDidAppear", - "viewWillDisappear", - "viewDidDisappear", - "viewWillLayoutSubviews", - "viewDidLayoutSubviews", - "didReceiveMemoryWarning", - "setNeedsLayout", - "layoutIfNeeded", - "layoutSubviews", - "didMoveToWindow", - "didMoveToSuperview", - "prepareForReuse" - ] - -generic_type_name: - max_length: - error: 20 - excluded: [] - allowed_symbols: [] - validates_start_with_lowercase: error - -type_name: - min_length: - warning: 3 - error: 0 - max_length: - warning: 50 - error: 1000 - excluded: ["ID"] - allowed_symbols: [] - validates_start_with_lowercase: error - validate_protocols: true - -identifier_name: - min_length: - warning: 3 - error: 2 - max_length: - warning: 40 - error: 60 - excluded: ["id", "vc", "c", "e", "x", "y", "z", "im", "up", "os", "ql", "tb", "mb"] - allowed_symbols: ["_"] - validates_start_with_lowercase: error - -# disabled_rules: -# # I haven’t used Nimble yet, I’ll turn it on after I use it later. -# - prefer_nimble -# -# # Opposite of existing indentation -# - leading_whitespace -# -# # Sometimes necessary and useful -# - no_fallthrough_only -# -# # All variables should be declared explicitly, expect a reverse version of this rule -# - redundant_optional_initialization -# -# # All enumeration values should be explicitly specified -# - redundant_string_enum_value -# -# # Sometimes in order to comment, `else {` will start a new line -# - statement_position -# -# # Keep using TODO -# - todo -# -# # A small, inconsequential detail that is not included in the specification -# - trailing_comma -# -# # Trailing spaces before lines are useful. For example, line breaks in method definitions have trailing spaces. -# - trailing_whitespace -# -# # Sometimes you still want to keep the naming of unused parameters. -# - unused_closure_parameter -# -# # After actual use, there are many scenarios where I don’t want to use trailing closures, -# # which leads to writing a lot of disable code, so I gave up using it. -# - trailing_closure