Rule Directory
Default Rules
attribute_name_spacing
: Attribute Name Spacingblanket_disable_command
: Blanket Disable Commandblock_based_kvo
: Block Based KVOclass_delegate_protocol
: Class Delegate Protocolclosing_brace
: Closing Brace Spacingclosure_parameter_position
: Closure Parameter Positioncolon
: Colon Spacingcomma
: Comma Spacingcomment_spacing
: Comment Spacingcompiler_protocol_init
: Compiler Protocol Initcomputed_accessors_order
: Computed Accessors Ordercontrol_statement
: Control Statementcustom_rules
: Custom Rulescyclomatic_complexity
: Cyclomatic Complexitydeployment_target
: Deployment Targetdiscouraged_direct_init
: Discouraged Direct Initializationduplicate_conditions
: Duplicate Conditionsduplicate_enum_cases
: Duplicate Enum Casesduplicate_imports
: Duplicate Importsduplicated_key_in_dictionary_literal
: Duplicated Key in Dictionary Literaldynamic_inline
: Dynamic Inlineempty_enum_arguments
: Empty Enum Argumentsempty_parameters
: Empty Parametersempty_parentheses_with_trailing_closure
: Empty Parentheses with Trailing Closurefile_length
: File Lengthfor_where
: Prefer For-Whereforce_cast
: Force Castforce_try
: Force Tryfunction_body_length
: Function Body Lengthfunction_parameter_count
: Function Parameter Countgeneric_type_name
: Generic Type Nameidentifier_name
: Identifier Nameimplicit_getter
: Implicit Getterinclusive_language
: Inclusive Languageinvalid_swiftlint_command
: Invalid SwiftLint Commandis_disjoint
: Is Disjointlarge_tuple
: Large Tupleleading_whitespace
: Leading Whitespacelegacy_cggeometry_functions
: Legacy CGGeometry Functionslegacy_constant
: Legacy Constantlegacy_constructor
: Legacy Constructorlegacy_hashing
: Legacy Hashinglegacy_nsgeometry_functions
: Legacy NSGeometry Functionslegacy_random
: Legacy Randomline_length
: Line Lengthmark
: Markmultiple_closures_with_trailing_closure
: Multiple Closures with Trailing Closurenesting
: Nestingno_fallthrough_only
: No Fallthrough onlyno_space_in_method_call
: No Space in Method Callnon_optional_string_data_conversion
: Non-optional String -> Data Conversionnotification_center_detachment
: Notification Center Detachmentns_number_init_as_function_reference
: NSNumber Init as Function Referencensobject_prefer_isequal
: NSObject Prefer isEqualopening_brace
: Opening Brace Spacingoperator_whitespace
: Operator Function Whitespaceoptional_data_string_conversion
: Optional Data -> String Conversionorphaned_doc_comment
: Orphaned Doc Commentprefer_type_checking
: Prefer Type Checkingprivate_over_fileprivate
: Private over Fileprivateprivate_unit_test
: Private Unit Testprotocol_property_accessors_order
: Protocol Property Accessors Orderreduce_boolean
: Reduce Booleanredundant_discardable_let
: Redundant Discardable Letredundant_objc_attribute
: Redundant @objc Attributeredundant_optional_initialization
: Redundant Optional Initializationredundant_set_access_control
: Redundant Access Control for Setterredundant_string_enum_value
: Redundant String Enum Valueredundant_void_return
: Redundant Void Returnreturn_arrow_whitespace
: Returning Whitespaceself_in_property_initialization
: Self in Property Initializationshorthand_operator
: Shorthand Operatorstatement_position
: Statement Positionstatic_over_final_class
: Static Over Final Classsuperfluous_disable_command
: Superfluous Disable Commandswitch_case_alignment
: Switch and Case Statement Alignmentsyntactic_sugar
: Syntactic Sugartodo
: Todotrailing_comma
: Trailing Commatrailing_newline
: Trailing Newlinetrailing_semicolon
: Trailing Semicolontrailing_whitespace
: Trailing Whitespacetype_body_length
: Type Body Lengthtype_name
: Type Nameunavailable_condition
: Unavailable Conditionunneeded_break_in_switch
: Unneeded Break in Switchunneeded_override
: Unneeded Overridden Functionsunneeded_synthesized_initializer
: Unneeded Synthesized Initializerunused_closure_parameter
: Unused Closure Parameterunused_control_flow_label
: Unused Control Flow Labelunused_enumerated
: Unused Enumeratedunused_optional_binding
: Unused Optional Bindingunused_setter_value
: Unused Setter Valuevalid_ibinspectable
: Valid IBInspectablevertical_parameter_alignment
: Vertical Parameter Alignmentvertical_whitespace
: Vertical Whitespacevoid_function_in_ternary
: Void Function in Ternaryvoid_return
: Void Returnxctfail_message
: XCTFail Message
Opt-in Rules
accessibility_label_for_image
: Accessibility Label for Imageaccessibility_trait_for_button
: Accessibility Trait for Buttonanonymous_argument_in_multiline_closure
: Anonymous Argument in Multiline Closurearray_init
: Array Initattributes
: Attributesbalanced_xctest_lifecycle
: Balanced XCTest Life Cycleclosure_body_length
: Closure Body Lengthclosure_end_indentation
: Closure End Indentationclosure_spacing
: Closure Spacingcollection_alignment
: Collection Element Alignmentcomma_inheritance
: Comma Inheritance Ruleconditional_returns_on_newline
: Conditional Returns on Newlinecontains_over_filter_count
: Contains over Filter Countcontains_over_filter_is_empty
: Contains over Filter is Emptycontains_over_first_not_nil
: Contains over First not Nilcontains_over_range_nil_comparison
: Contains over Range Comparison to Nilcontrasted_opening_brace
: Contrasted Opening Braceconvenience_type
: Convenience Typedirect_return
: Direct Returndiscarded_notification_center_observer
: Discarded Notification Center Observerdiscouraged_assert
: Discouraged Assertdiscouraged_none_name
: Discouraged None Namediscouraged_object_literal
: Discouraged Object Literaldiscouraged_optional_boolean
: Discouraged Optional Booleandiscouraged_optional_collection
: Discouraged Optional Collectionempty_collection_literal
: Empty Collection Literalempty_count
: Empty Countempty_string
: Empty Stringempty_xctest_method
: Empty XCTest Methodenum_case_associated_values_count
: Enum Case Associated Values Countexpiring_todo
: Expiring Todoexplicit_acl
: Explicit ACLexplicit_enum_raw_value
: Explicit Enum Raw Valueexplicit_init
: Explicit Initexplicit_top_level_acl
: Explicit Top Level ACLexplicit_type_interface
: Explicit Type Interfaceextension_access_modifier
: Extension Access Modifierfallthrough
: Fallthroughfatal_error_message
: Fatal Error Messagefile_header
: File Headerfile_name
: File Namefile_name_no_space
: File Name no Spacefile_types_order
: File Types Orderfinal_test_case
: Final Test Casefirst_where
: First Whereflatmap_over_map_reduce
: Flat Map over Map Reduceforce_unwrapping
: Force Unwrappingfunction_default_parameter_at_end
: Function Default Parameter at Endibinspectable_in_extension
: IBInspectable in Extensionidentical_operands
: Identical Operandsimplicit_return
: Implicit Returnimplicitly_unwrapped_optional
: Implicitly Unwrapped Optionalindentation_width
: Indentation Widthinert_defer
: Inert Deferjoined_default_parameter
: Joined Default Parameterlast_where
: Last Wherelegacy_multiple
: Legacy Multiplelegacy_objc_type
: Legacy Objective-C Reference Typelet_var_whitespace
: Variable Declaration Whitespaceliteral_expression_end_indentation
: Literal Expression End Indentationlocal_doc_comment
: Local Doc Commentlower_acl_than_parent
: Lower ACL than Parentmissing_docs
: Missing Docsmodifier_order
: Modifier Ordermultiline_arguments
: Multiline Argumentsmultiline_arguments_brackets
: Multiline Arguments Bracketsmultiline_function_chains
: Multiline Function Chainsmultiline_literal_brackets
: Multiline Literal Bracketsmultiline_parameters
: Multiline Parametersmultiline_parameters_brackets
: Multiline Parameters Bracketsnimble_operator
: Nimble Operatorno_empty_block
: No Empty Blockno_extension_access_modifier
: No Extension Access Modifierno_grouping_extension
: No Grouping Extensionno_magic_numbers
: No Magic Numbersnon_overridable_class_declaration
: Class Declaration in Final Classnslocalizedstring_key
: NSLocalizedString Keynslocalizedstring_require_bundle
: NSLocalizedString Require Bundlenumber_separator
: Number Separatorobject_literal
: Object Literalone_declaration_per_file
: One Declaration per Fileoperator_usage_whitespace
: Operator Usage Whitespaceoptional_enum_case_matching
: Optional Enum Case Matchoverridden_super_call
: Overridden Method Calls Superoverride_in_extension
: Override in Extensionpattern_matching_keywords
: Pattern Matching Keywordsperiod_spacing
: Period Spacingprefer_key_path
: Prefer Key Pathprefer_nimble
: Prefer Nimbleprefer_self_in_static_references
: Prefer Self in Static Referencesprefer_self_type_over_type_of_self
: Prefer Self Type Over Type of Selfprefer_zero_over_explicit_init
: Prefer Zero Over Explicit Initprefixed_toplevel_constant
: Prefixed Top-Level Constantprivate_action
: Private Actionsprivate_outlet
: Private Outletsprivate_subject
: Private Combine Subjectprivate_swiftui_state
: Private SwiftUI State Propertiesprohibited_interface_builder
: Prohibited Interface Builderprohibited_super_call
: Prohibited Calls to Superquick_discouraged_call
: Quick Discouraged Callquick_discouraged_focused_test
: Quick Discouraged Focused Testquick_discouraged_pending_test
: Quick Discouraged Pending Testraw_value_for_camel_cased_codable_enum
: Raw Value for Camel Cased Codable Enumreduce_into
: Reduce intoredundant_nil_coalescing
: Redundant Nil Coalescingredundant_self_in_closure
: Redundant Self in Closureredundant_type_annotation
: Redundant Type Annotationrequired_deinit
: Required Deinitrequired_enum_case
: Required Enum Casereturn_value_from_void_function
: Return Value from Void Functionself_binding
: Self Bindingshorthand_argument
: Shorthand Argumentshorthand_optional_binding
: Shorthand Optional Bindingsingle_test_class
: Single Test Classsorted_enum_cases
: Sorted Enum Casessorted_first_last
: Min or Max over Sorted First or Lastsorted_imports
: Sorted Importsstatic_operator
: Static Operatorstrict_fileprivate
: Strict Fileprivatestrong_iboutlet
: Strong IBOutletsuperfluous_else
: Superfluous Elseswitch_case_on_newline
: Cases on Newlinetest_case_accessibility
: Test Case Accessibilitytoggle_bool
: Toggle Booltrailing_closure
: Trailing Closuretype_contents_order
: Type Contents Orderunavailable_function
: Unavailable Functionunhandled_throwing_task
: Unhandled Throwing Taskunneeded_parentheses_in_closure_argument
: Unneeded Parentheses in Closure Argumentunowned_variable_capture
: Unowned Variable Captureuntyped_error_in_catch
: Untyped Error in Catchunused_capture_list
: Unused Capture Listunused_parameter
: Unused Parametervertical_parameter_alignment_on_call
: Vertical Parameter Alignment on Callvertical_whitespace_between_cases
: Vertical Whitespace Between Casesvertical_whitespace_closing_braces
: Vertical Whitespace before Closing Bracesvertical_whitespace_opening_braces
: Vertical Whitespace after Opening Bracesweak_delegate
: Weak Delegatexct_specific_matcher
: XCTest Specific Matcheryoda_condition
: Yoda Condition