This repository has been archived by the owner on Nov 12, 2024. It is now read-only.
forked from bustoutsolutions/siesta
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.swiftlint.yml
114 lines (109 loc) · 3.17 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
disabled_rules:
# Whitesmiths
- closing_brace
- opening_brace
- switch_case_alignment
- statement_position
- closure_parameter_position
- weak_delegate # name-based heuristic misdiagnoses correct usage in Siesta
- class_delegate_protocol # ditto
- colon # Siesta prefers dict types without spaces
- comma # Doesn't support flex right spacing
- unused_closure_parameter # Sometime it's useful to state what a closure is ignoring
- multiple_closures_with_trailing_closure # Harms readability in actual use
- line_length
- force_try
- file_length
- todo
- cyclomatic_complexity # disable in one spot only?
- type_body_length # consider enabling
- nesting
- force_cast
opt_in_rules:
- anyobject_protocol
- array_init
- closure_spacing
- collection_alignment
- conditional_returns_on_newline
- contains_over_first_not_nil
- convenience_type
- empty_count
- empty_string
- empty_xctest_method
- explicit_init
# - explicit_top_level_acl # flags extensions with errors in Swift 5, but extensions in Siesta don't use ACL
- fallthrough
- fatal_error_message
- file_header
- first_where
- force_unwrapping
- identical_operands
- implicit_return
- implicitly_unwrapped_optional
- last_where
- legacy_random
- literal_expression_end_indentation
- lower_acl_than_parent
- missing_docs
- modifier_order
- multiline_function_chains
- multiline_literal_brackets
- multiline_parameters
- nimble_operator
- no_extension_access_modifier
- nslocalizedstring_key
# - operator_usage_whitespace # would be good if it could allow extra space
- override_in_extension
- pattern_matching_keywords
- prohibited_super_call
- quick_discouraged_call
- quick_discouraged_focused_test # Note: doesn't currently work because it only looks inside a spec() method
- quick_discouraged_pending_test # Note: doesn't currently work because it only looks inside a spec() method
- redundant_nil_coalescing
- redundant_type_annotation
- sorted_first_last
- toggle_bool
- unavailable_function
- unneeded_parentheses_in_closure_argument
- untyped_error_in_catch
- unused_import
- unused_private_declaration
# - vertical_parameter_alignment_on_call # debatable
- vertical_whitespace_between_cases
- vertical_whitespace_closing_braces
- vertical_whitespace_opening_braces
- yoda_condition
included: # paths to include during linting. `--path` is ignored if present.
- Source
- Tests
colon:
flexible_right_spacing: true
vertical_whitespace:
max_empty_lines: 2
identifier_name:
min_length: 1
attributes:
same_line: false
file_header:
required_pattern: |-
//
// SWIFTLINT_CURRENT_FILENAME.*
// Siesta
//
// Created by .* on \d{4}/\d{1,2}/\d{1,2}\.
// Copyright © \d{4} Bust Out Solutions\. All rights reserved\.
//
modifier_order:
preferred_modifier_order: [
"acl",
"setterACL",
"override",
"dynamic",
"mutators",
"lazy",
"final",
"required",
"convenience",
"typeMethods",
"owned"
]