-
Notifications
You must be signed in to change notification settings - Fork 1
/
.swiftlint.yml
105 lines (101 loc) · 2.68 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
disabled_rules:
- trailing_newline
- opening_brace
- empty_count
- comma
- colon
- force_cast
- type_name
- variable_name_min_length
- trailing_semicolon
- force_try
- function_body_length
- nesting
- variable_name
- conditional_binding_cascade
- variable_name_max_length
- operator_whitespace
- control_statement
- legacy_constant
- line_length
- return_arrow_whitespace
- trailing_whitespace
- closing_brace
- statement_position
- type_body_length
- todo
- legacy_constructor
- valid_docs
- missing_docs
- file_length
- leading_whitespace
- redundant_optional_initialization
- unused_optional_initialization
- cyclomatic_complexity
- unused_optional_binding
- void_return
- implicit_getter
- unused_closure_parameter
- mark
- notification_center_detachment
- for_where
- vertical_whitespace
- empty_parameters
- discarded_notification_center_observer
- class_delegate_protocol
- syntactic_sugar
- function_parameter_count
- trailing_comma
- weak_delegate
- redundant_string_enum_value
- unused_enumerated
- empty_enum_arguments
- shorthand_operator
- empty_parentheses_with_trailing_closure
- closure_parameter_position
- redundant_discardable_let
- large_tuple
- vertical_parameter_alignment
- block_based_kvo
- compiler_protocol_init
- discouraged_direct_init
- dynamic_inline
- fallthrough
- generic_type_name
- is_disjoint
- legacy_cggeometry_functions
- legacy_nsgeometry_functions
- multiple_closures_with_trailing_closure
- private_over_fileprivate
- private_unit_test
- protocol_property_accessors_order
- redundant_void_return
- superfluous_disable_command
- switch_case_alignment
- unneeded_break_in_switch
- valid_ibinspectable
- xctfail_message
opt_in_rules:
- airCasting_date
- print_using
custom_rules:
airCasting_date: # rule identifier
included: ".*\\.swift" # regex that defines paths to include during linting. optional.
excluded: ".*Tests\\.swift" # regex that defines paths to exclude during linting. optional
name: "Air Casting date" # rule name. optional.
regex: "(\\W|^)Date(\\(|\\.)" # matching pattern
capture_group: 0 # number of regex capture group to highlight the rule violation at. optional.
match_kinds: # SyntaxKinds to match. optional.
- identifier
message: "You! Use Air Casting date format - use DateBuilder class" # violation message. optional.
severity: error # violation severity. optional
print_using:
included: ".*\\.swift" # regex that defines paths to include during linting. optional.
excluded: ".*Tests\\.swift" # regex that defines paths to exclude during linting. optional
regex: "print(\\(|\\.)"
match_kinds:
- identifier
message: "Print decrease performance of the app - use Log.info"
severity: error
excluded:
- Pods