forked from mozilla-mobile/firefox-ios
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.swiftlint.yml
133 lines (128 loc) · 3.13 KB
/
.swiftlint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
disabled_rules: # rule identifiers to exclude from running
# Auto-correctable rules
- void_return
- trailing_semicolon
- trailing_newline
- trailing_comma
- syntactic_sugar
- statement_position
- return_arrow_whitespace
- redundant_void_return
- redundant_optional_initialization
- redundant_objc_attribute
- redundant_discardable_let
- protocol_property_accessors_order
- private_over_fileprivate
- opening_brace
- no_space_in_method_call
- mark
- legacy_nsgeometry_functions
- legacy_constructor
- legacy_constant
- legacy_cggeometry_functions
- empty_parentheses_with_trailing_closure
- empty_parameters
- empty_enum_arguments
- control_statement
- comment_spacing
- closing_brace
# Disabled all default rules
- block_based_kvo
- class_delegate_protocol
- closure_parameter_position
- compiler_protocol_init
- computed_accessors_order
- custom_rules
- cyclomatic_complexity
- deployment_target
- discouraged_direct_init
- discarded_notification_center_observer
- duplicate_enum_cases
- duplicate_imports
- duplicated_key_in_dictionary_literal
- dynamic_inline
- fallthrough
- file_length
- for_where
- force_cast
- force_try
- function_body_length
- function_parameter_count
- generic_type_name
- identifier_name
- implicit_getter
- inclusive_language
- inert_defer
- is_disjoint
- large_tuple
- legacy_hashing
- legacy_random
- line_length
- missing_docs
- multiple_closures_with_trailing_closure
- nesting
- no_fallthrough_only
- notification_center_detachment
- nsobject_prefer_isequal
- orphaned_doc_comment
- private_unit_test
- reduce_boolean
- redundant_set_access_control
- redundant_string_enum_value
- self_in_property_initialization
- shorthand_operator
- superfluous_disable_command
- switch_case_alignment
- todo
- type_name
- type_body_length
- unneeded_break_in_switch
- unused_capture_list
- unused_closure_parameter
- unused_control_flow_label
- unused_enumerated
- unused_optional_binding
- unused_setter_value
- valid_ibinspectable
- vertical_parameter_alignment
- weak_delegate
- xctfail_message
opt_in_rules: # some rules are only opt-in
# These rules were originally opted into. Disabling for now to get
# Swiftlint up and running.
# - closing_brace
# - opening_brace
# - return_arrow_whitespace
# - trailing_semicolon
# - statement_position
# - explicit_init
# - file_header
# - deployment_target
# - discouraged_optional_collection
# - duplicate_imports
# - empty_string
# - overridden_super_call
# - prohibited_interface_builder
# - prohibited_super_call
# - protocol_property_accessors_order
# - redundant_objc_attribute
# - redundant_type_annotation
# - unused_import
# Find all the available rules by running:
# swiftlint rules
excluded: # paths to ignore during linting. Takes precedence over `included`.
- build
- Client/Assets/Search/get_supported_locales.swift
- Client/Generated
- fastlane/
- FxA
- FxAClient
- Source/ExcludedFolder
- Source/ExcludedFile.swift
- Storage/ThirdParty/SwiftData.swift
- Sync/Generated/Metrics.swift
- ThirdParty
- UITests/
- XCUITests/
# reporter: "json" # reporter type (xcode, json, csv, checkstyle)
reporter: "xcode" # reporter type (xcode, json, csv, checkstyle)