Last active
February 24, 2025 12:17
-
-
Save T1T4N/662c0676e67be158ce4161fd60aa0ea3 to your computer and use it in GitHub Desktop.
Default SwiftLint configuration as only_rules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# strict: true | |
# File organization | |
# included: | |
# - Sources | |
# - Tests | |
excluded: | |
- .build | |
- .swiftpm | |
- DerivedData | |
- Pods | |
- Tests | |
analyzer_rules: | |
- capture_variable | |
- explicit_self # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#explicit-self | |
- typesafe_array_init | |
- unused_declaration # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#unused-declaration | |
- unused_import # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#unused-import | |
only_rules: | |
- attribute_name_spacing | |
- blanket_disable_command | |
- block_based_kvo # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#block-based-kvo | |
- class_delegate_protocol # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#class-delegate-protocol | |
- closing_brace # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#closing-brace-spacing | |
- closure_parameter_position | |
- colon # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#colon | |
- comma # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#comma-spacing | |
- comment_spacing | |
- compiler_protocol_init # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#compiler-protocol-init | |
- computed_accessors_order | |
- control_statement # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#control-statement | |
- custom_rules | |
- cyclomatic_complexity # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#cyclomatic-complexity | |
- deployment_target # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#deployment-target | |
- discouraged_direct_init | |
- duplicate_conditions | |
- duplicate_enum_cases # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#duplicate-enum-cases | |
- duplicate_imports | |
- duplicated_key_in_dictionary_literal | |
- dynamic_inline # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#dynamic-inline | |
- empty_enum_arguments | |
- empty_parameters # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#empty-parameters | |
- empty_parentheses_with_trailing_closure # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#empty-parentheses-with-trailing-closure | |
- file_length # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#file-line-length | |
- for_where | |
- force_cast # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#force-cast | |
- force_try # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#force-try | |
- function_body_length | |
- function_parameter_count # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#function-parameter-count | |
- generic_type_name # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#generic-type-name | |
- identifier_name # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#identifier-name | |
- implicit_getter # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#implicit-getter | |
- inclusive_language | |
# - inert_defer # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#inert-defer | |
- invalid_swiftlint_command | |
- is_disjoint # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#is-disjoint | |
- large_tuple # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#large-tuple | |
- leading_whitespace # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#leading-whitespace | |
- legacy_cggeometry_functions # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#legacy-cggeometry-functions | |
- legacy_constant # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#legacy-constant | |
- legacy_constructor # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#legacy-constructor | |
- legacy_hashing | |
- legacy_nsgeometry_functions | |
- legacy_random | |
- line_length # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#line-length | |
- mark # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#mark | |
- multiple_closures_with_trailing_closure # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#multiple-closures-with-trailing-closure | |
- nesting # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#nesting | |
- no_fallthrough_only | |
- no_space_in_method_call | |
- non_optional_string_data_conversion | |
- notification_center_detachment | |
- ns_number_init_as_function_reference | |
- nsobject_prefer_isequal # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#nsobject-prefer-isequal | |
- opening_brace # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#opening-brace-spacing | |
- operator_whitespace | |
- optional_data_string_conversion | |
- orphaned_doc_comment # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#orphaned-doc-comment | |
- prefer_type_checking | |
- private_over_fileprivate | |
- private_unit_test | |
- protocol_property_accessors_order # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#protocol-property-accessors-order | |
- reduce_boolean | |
- redundant_discardable_let # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#redundant-discardable-let | |
- redundant_objc_attribute | |
- redundant_optional_initialization | |
- redundant_sendable | |
- redundant_set_access_control | |
- redundant_string_enum_value | |
- redundant_void_return # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#redundant-void-return | |
- return_arrow_whitespace # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#returning-whitespace | |
- self_in_property_initialization | |
- shorthand_operator # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#shorthand-operator | |
- statement_position # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#statement-position | |
- static_over_final_class | |
- superfluous_disable_command # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#superfluous-disable-command | |
- switch_case_alignment # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#switch-and-case-statement-alignment | |
- syntactic_sugar # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#syntactic-sugar | |
- todo | |
- trailing_comma # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#trailing-comma | |
- trailing_newline # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#trailing-newline | |
- trailing_semicolon # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#trailing-semicolon | |
- trailing_whitespace # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#trailing-whitespace | |
- type_body_length | |
- type_name # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#type-name | |
- unavailable_condition | |
- unneeded_break_in_switch # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#unneeded-break-in-switch | |
- unneeded_override | |
- unneeded_synthesized_initializer | |
- unused_closure_parameter | |
- unused_control_flow_label | |
- unused_enumerated | |
- unused_optional_binding | |
- unused_setter_value | |
- valid_ibinspectable | |
- vertical_parameter_alignment # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#vertical-parameter-alignment | |
- vertical_whitespace # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#vertical-whitespace | |
- void_function_in_ternary | |
- void_return | |
- xctfail_message # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#xctfail-message | |
## opt_in_rules: | |
# - accessibility_label_for_image | |
# - accessibility_trait_for_button | |
# - anonymous_argument_in_multiline_closure | |
# - array_init | |
# - async_without_await | |
# - attributes | |
# - balanced_xctest_lifecycle | |
# - closure_body_length | |
# - closure_end_indentation | |
# - closure_spacing | |
# - collection_alignment | |
# - comma_inheritance | |
# - conditional_returns_on_newline | |
# - contains_over_filter_count | |
# - contains_over_filter_is_empty | |
# - contains_over_first_not_nil | |
# - contains_over_range_nil_comparison | |
# - contrasted_opening_brace | |
# - convenience_type | |
# - direct_return | |
# - discarded_notification_center_observer # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#discarded-notification-center-observer | |
# - discouraged_assert | |
# - discouraged_none_name | |
# - discouraged_object_literal | |
# - discouraged_optional_boolean | |
# - discouraged_optional_collection | |
# - empty_collection_literal | |
# - empty_count | |
# - empty_string | |
# - empty_xctest_method | |
# - enum_case_associated_values_count | |
# - expiring_todo | |
# - explicit_acl # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#explicit-acl | |
# - explicit_enum_raw_value | |
# - explicit_init | |
# - explicit_top_level_acl | |
# - explicit_type_interface | |
# - extension_access_modifier | |
# - fallthrough # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#fallthrough | |
# - fatal_error_message | |
# - file_header | |
# - file_name | |
# - file_name_no_space | |
# - file_types_order | |
# - final_test_case | |
# - first_where | |
# - flatmap_over_map_reduce | |
# - force_unwrapping | |
# - function_default_parameter_at_end | |
# - ibinspectable_in_extension | |
# - identical_operands # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#identical-operands | |
# - implicit_return | |
# - implicitly_unwrapped_optional | |
# - indentation_width | |
# - joined_default_parameter | |
# - last_where | |
# - legacy_multiple | |
# - legacy_objc_type | |
# - let_var_whitespace | |
# - literal_expression_end_indentation | |
# - local_doc_comment | |
# - lower_acl_than_parent | |
# - missing_docs | |
# - modifier_order # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#modifier-order | |
# - multiline_arguments | |
# - multiline_arguments_brackets | |
# - multiline_function_chains | |
# - multiline_literal_brackets | |
# - multiline_parameters | |
# - multiline_parameters_brackets | |
# - nimble_operator # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#nimble-operator | |
# - no_empty_block | |
# - no_extension_access_modifier | |
# - no_grouping_extension | |
# - no_magic_numbers | |
# - non_overridable_class_declaration | |
# - nslocalizedstring_key | |
# - nslocalizedstring_require_bundle | |
# - number_separator | |
# - object_literal | |
# - one_declaration_per_file | |
# - opaque_over_existential | |
# - operator_usage_whitespace # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#operator-usage-whitespace | |
# - optional_enum_case_matching | |
# - overridden_super_call # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#overridden-methods-call-super | |
# - override_in_extension | |
# - pattern_matching_keywords # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#pattern-matching-keywords | |
# - period_spacing | |
# - prefer_key_path | |
# - prefer_nimble | |
# - prefer_self_in_static_references | |
# - prefer_self_type_over_type_of_self # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#prefer-self-type-over-type-of-self | |
# - prefer_zero_over_explicit_init | |
# - prefixed_toplevel_constant | |
# - private_action # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#private-actions | |
# - private_outlet | |
# - private_subject | |
# - private_swiftui_state | |
# - prohibited_interface_builder | |
# - prohibited_super_call | |
# - quick_discouraged_call | |
# - quick_discouraged_focused_test | |
# - quick_discouraged_pending_test | |
# - raw_value_for_camel_cased_codable_enum | |
# - reduce_into | |
# - redundant_nil_coalescing # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#redundant-nil-coalescing | |
# - redundant_self_in_closure | |
# - redundant_type_annotation | |
# - required_deinit | |
# - required_enum_case # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#required-enum-case | |
# - return_value_from_void_function | |
# - self_binding | |
# - shorthand_argument | |
# - shorthand_optional_binding | |
# - single_test_class | |
# - sorted_enum_cases | |
# - sorted_first_last | |
# - sorted_imports # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#sorted-imports | |
# - static_operator # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#static-operator | |
# - strict_fileprivate | |
# - strong_iboutlet | |
# - superfluous_else | |
# - switch_case_on_newline | |
# - test_case_accessibility | |
# - toggle_bool | |
# - trailing_closure | |
# - type_contents_order | |
# - unavailable_function | |
# - unhandled_throwing_task | |
# - unneeded_parentheses_in_closure_argument # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#unneeded-parentheses-in-closure-argument | |
# - unowned_variable_capture | |
# - untyped_error_in_catch # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#untyped-error-in-catch | |
# - unused_parameter | |
# - vertical_parameter_alignment_on_call | |
# - vertical_whitespace_between_cases | |
# - vertical_whitespace_closing_braces | |
# - vertical_whitespace_opening_braces | |
# - weak_delegate # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#weak-delegate | |
# - xct_specific_matcher | |
# - yoda_condition | |
## MARK: Default configuration | |
# attribute_name_spacing: | |
# severity: error | |
# | |
# attributes: | |
# severity: warning | |
# always_on_line_above: [] # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#attributes | |
# | |
# balanced_xctest_lifecycle: # https://github.com/realm/SwiftLint/blob/4388c9f8991901845d1aaf74a3ffc93e2395f880/Rules.md#balanced-xctest-lifecycle | |
# severity: warning | |
# test_parent_classes: | |
# - QuickSpec | |
# - XCTestCase | |
# | |
# cyclomatic_complexity: | |
# warning: 10 | |
# error: 20 | |
# ignores_case_statements: false | |
# | |
# deployment_target: | |
# iOS_deployment_target: 9.0 | |
# | |
# explicit_acl: | |
# severity: warning | |
# | |
# explicit_self: | |
# severity: warning | |
# | |
# file_length: | |
# warning: 400 | |
# error: 1000 | |
# ignore_comment_only_lines: false | |
# | |
# function_parameter_count: | |
# warning: 5 | |
# error: 8 | |
# ignores_default_parameters: true | |
# | |
# generic_type_name: | |
# min_length: | |
# warning: 1 | |
# error: 0 | |
# max_length: | |
# warning: 20 | |
# error: 1000 | |
# | |
# identifier_name: | |
# min_length: | |
# warning: 3 | |
# error: 2 | |
# max_length: | |
# warning: 40 | |
# error: 60 | |
# allowed_symbols: [] | |
# excluded: | |
# - “^id$” | |
# | |
# large_tuple: | |
# warning: 2 | |
# error: 3 | |
# | |
# line_length: | |
# warning: 120 | |
# error: 200 | |
# ignores_urls: false | |
# ignores_function_declarations: false | |
# ignores_comments: false | |
# ignores_interpolated_strings: false | |
# | |
# mark: | |
# severity: warning | |
# | |
# nesting: | |
# type_level: | |
# warning: 1 | |
# function_level: | |
# warning: 2 | |
# | |
# overridden_super_call: | |
# severity: warning | |
# included: | |
# - "*" | |
# | |
# trailing_comma: | |
# severity: warning | |
# mandatory_comma: false | |
# | |
# type_name: | |
# min_length: | |
# warning: 3 | |
# error: 0 | |
# max_length: | |
# warning: 40 | |
# error: 1000 | |
# unallowed_symbols_severity: error | |
# validates_start_with_lowercase: error | |
# validate_protocols: true | |
# | |
# vertical_whitespace: | |
# severity: warning | |
# max_empty_lines: 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment