forked from mozilla-mobile/firefox-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.swiftlint.yml
128 lines (121 loc) · 3.33 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
disabled_rules: # rule identifiers to exclude from running
# Auto-correctable rules
- trailing_comma
# Disabled all default rules
- block_based_kvo
- closure_parameter_position
- custom_rules
- cyclomatic_complexity
- deployment_target
- discouraged_direct_init
- discarded_notification_center_observer
- duplicate_enum_cases
- duplicate_imports
- duplicated_key_in_dictionary_literal
- fallthrough
- file_length
- force_cast
- force_try
- function_body_length
- function_parameter_count
- generic_type_name
- identifier_name
- is_disjoint
- legacy_random
- line_length
- missing_docs
- multiple_closures_with_trailing_closure
- nesting
- no_fallthrough_only
- notification_center_detachment
- nsobject_prefer_isequal
- private_unit_test
- reduce_boolean
- redundant_set_access_control
- self_in_property_initialization
- shorthand_operator
- superfluous_disable_command
- todo
- type_name
- type_body_length
- unneeded_break_in_switch
- unused_capture_list
- unused_closure_parameter
- unused_control_flow_label
- unused_enumerated
- valid_ibinspectable
- 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.
# - statement_position
- file_header
# - deployment_target
# - discouraged_optional_collection
# - prohibited_interface_builder
# - prohibited_super_call
# - protocol_property_accessors_order
- redundant_objc_attribute
- redundant_type_annotation
# Find all the available rules by running:
# swiftlint rules
- attributes
- closing_brace
- contains_over_filter_count
- contains_over_filter_is_empty
- contains_over_first_not_nil
- contains_over_range_nil_comparison
- empty_collection_literal
- empty_count
- empty_string
- empty_xctest_method
- explicit_init
- first_where
- discouraged_assert
- duplicate_imports
- duplicate_enum_cases
- last_where
- multiline_arguments
- opening_brace
- overridden_super_call
- return_arrow_whitespace
- vertical_parameter_alignment_on_call
- vertical_whitespace_closing_braces
- vertical_whitespace_opening_braces
- yoda_condition
file_header:
required_string: |
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/
analyzer_rules: # Rules run by `swiftlint analyze`
- unused_import
excluded: # paths to ignore during linting. Takes precedence over `included`.
- build/
- .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
- Storage/Generated/Metrics.swift
- ThirdParty
- test-fixtures/tmp
- Tests/UITests/
- l10n-screenshots-dd/
- DerivedData/
# Package.swift files need a custom header for swift-tools-version
# so must be excluded due to file_header rule
- Package.swift
- BrowserKit/Package.swift
- content-blocker-lib-ios/ContentBlockerGenerator/Package.swift
included:
- /Users/vagrant/git
- .
# reporter: "json" # reporter type (xcode, json, csv, checkstyle)
reporter: "xcode" # reporter type (xcode, json, csv, checkstyle)