-
Notifications
You must be signed in to change notification settings - Fork 8
/
.swiftlint.yml
111 lines (105 loc) · 3.05 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
# File tracking the same rules as Firefox Mobile
disabled_rules: # rule identifiers to exclude from running
# Auto-correctable rules
- trailing_comma
# Disabled all default rules
- non_optional_string_data_conversion
- block_based_kvo
- closure_parameter_position
- custom_rules
- cyclomatic_complexity
- deployment_target
- discouraged_direct_init
- discarded_notification_center_observer
- fallthrough
- file_length
- force_cast
- 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
- self_in_property_initialization
- shorthand_operator
- 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
# - 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
- anyobject_protocol
- array_init
- attributes
- closing_brace
- closure_spacing
- contains_over_filter_count
- contains_over_filter_is_empty
- contains_over_first_not_nil
- contains_over_range_nil_comparison
- discouraged_assert
- empty_collection_literal
- empty_count
- empty_string
- empty_xctest_method
- explicit_init
- duplicate_imports
- duplicate_enum_cases
- file_header
- last_where
- multiline_arguments_brackets
- multiline_arguments
- opening_brace
- optional_enum_case_matching
- 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`
- capture_variable
- unused_import
excluded: # paths to ignore during linting. Takes precedence over `included`.
- build
- .build
- PocketKit/.build
- PocketKit/Sources/Sync/API.swift
- DerivedData/
- PocketKit/Sources/PocketGraphTestMocks/
- PocketKit/Sources/PocketGraph/
- PocketKit/Sources/Localization/Strings.swift
# reporter: "json" # reporter type (xcode, json, csv, checkstyle)
reporter: 'xcode' # reporter type (xcode, json, csv, checkstyle)