-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
.swiftlint.yml
120 lines (117 loc) · 2.9 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
# Last Updated for SwiftLint 0.51.0
disabled_rules:
- file_name
- nesting
- private_over_fileprivate
- redundant_optional_initialization
# FIXME: remove control_statement exception
- control_statement # 41
# FIXME: remove force_cast exception when plugin refactoring is done.
- force_cast # 37
- line_length
- type_body_length
- function_body_length
- file_length
- todo
- for_where
# FIXME: disabled because it produces lots of warnings at the moment, we should enable this and fix them
- accessibility_label_for_image
opt_in_rules:
- accessibility_label_for_image
- accessibility_trait_for_button
- array_init
- closure_end_indentation
- closure_spacing
- collection_alignment
- comma_inheritance
- contains_over_filter_count
- contains_over_filter_is_empty
- contains_over_first_not_nil
- contains_over_range_nil_comparison
- convenience_type
- discarded_notification_center_observer
- discouraged_assert
- discouraged_none_name
- empty_collection_literal
- empty_count
- empty_string
- explicit_init
- fatal_error_message
- file_name
- first_where
- flatmap_over_map_reduce
# FIXME: remove all force unwrapping or add individual exceptions
# TODO: enable force_unwrapping with above merge request
# - force_unwrapping # 113
- identical_operands
- joined_default_parameter
- last_where
- legacy_multiple
- literal_expression_end_indentation
- local_doc_comment
- lower_acl_than_parent
- multiline_function_chains
- multiline_literal_brackets
- multiline_parameters
- nslocalizedstring_key
- optional_enum_case_matching
- prefer_self_in_static_references
- prefer_self_type_over_type_of_self
- prefer_zero_over_explicit_init
- reduce_into
# FIXME: remove all redundant type annotations
# TODO: enable redundant_type_annotation with above merge request
# - redundant_type_annotation # 54
- return_value_from_void_function
- self_binding
- sorted_first_last
- toggle_bool
- trailing_closure
- unavailable_function
- unneeded_parentheses_in_closure_argument
- untyped_error_in_catch
- vertical_whitespace_closing_braces
- vertical_whitespace_opening_braces
- weak_delegate
- xct_specific_matcher
- yoda_condition
analyzer_rules:
- capture_variable
- typesafe_array_init
- unused_declaration
- unused_import
cyclomatic_complexity:
ignores_case_statements: true
explicit_init:
severity: error
fatal_error_message:
severity: error
generic_type_name:
max_length:
warning: 40
identifier_name:
excluded:
- id
- np
- dx
- dy
- ip
nslocalizedstring_key:
severity: error
trailing_comma:
mandatory_comma: true
trailing_whitespace:
ignores_empty_lines: true
type_name:
excluded:
- ID
unavailable_function:
severity: error
unused_import:
require_explicit_imports: true
weak_delegate:
severity: error
empty_count:
severity: warning
excluded:
- KDE Connect/fastlane