-
Notifications
You must be signed in to change notification settings - Fork 15
/
.swiftlint.yml
72 lines (72 loc) · 1.72 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
included:
- Sources
disabled_rules:
- trailing_comma
- nesting
- fallthrough
- shorthand_operator
- todo
- large_tuple
- identifier_name
- type_name
- blanket_disable_command
opt_in_rules:
- closure_end_indentation
- closure_spacing
- empty_count
- explicit_init
- first_where
- implicit_return
- joined_default_parameter
- literal_expression_end_indentation
- overridden_super_call
- prohibited_super_call
- sorted_first_last
- unneeded_parentheses_in_closure_argument
- vertical_parameter_alignment_on_call
- yoda_condition
- nslocalizedstring_key
- unused_setter_value
- unused_import
- optional_enum_case_matching
- prefer_self_type_over_type_of_self
- contains_over_range_nil_comparison
- flatmap_over_map_reduce
- empty_collection_literal
- contains_over_first_not_nil
- contains_over_filter_count
- contains_over_filter_is_empty
- reduce_into
custom_rules:
comment_whitespace:
name: "Comment Whitespace"
regex: //\S
match_kinds: comment
message: "Comments must begin with a whitespace character"
spaces_not_tabs:
name: "Spaces not Tabs"
regex: ^\t
message: "Use four spaces, not tabs"
point_zero:
name: "Point Zero"
regex: '(?<!iOS\s)(?<!macOS\s)(?<!\.)\b[\d_]+\.0\b'
match_kinds:
- number
- attribute.builtin
message: "Don't add a .0 to the end of floating point literals"
fatal_error:
name: "Fatal Error"
regex: '\bfatalError\b'
match_kinds:
- identifier
message: "Use orionError instead of fatalError"
force_try: warning
force_cast: warning
function_body_length: 100
line_length: 135
file_length: 450
cyclomatic_complexity: 12
function_parameter_count: 7
implicit_return:
included:
- closure