-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.swiftlint.yml
More file actions
136 lines (128 loc) · 3.38 KB
/
.swiftlint.yml
File metadata and controls
136 lines (128 loc) · 3.38 KB
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
only_rules: # Only enforce these rules, ignore all others
- line_length
- blanket_disable_command
- class_delegate_protocol
- closure_spacing
- closure_parameter_position
- colon
- comma
- comment_spacing
- compiler_protocol_init
- computed_accessors_order
- control_statement
- duplicate_conditions
- dynamic_inline
- empty_enum_arguments
- empty_parameters
- empty_parentheses_with_trailing_closure
- for_where
- force_try
- implicit_getter
- inclusive_language
- invalid_swiftlint_command
- large_tuple
- leading_whitespace
- legacy_cggeometry_functions
- legacy_constant
- legacy_constructor
- legacy_hashing
- legacy_nsgeometry_functions
- mark
- no_space_in_method_call
- ns_number_init_as_function_reference
- function_name_whitespace
- orphaned_doc_comment
- private_over_fileprivate
- protocol_property_accessors_order
- redundant_discardable_let
- redundant_objc_attribute
- implicit_optional_initialization
- redundant_string_enum_value
- redundant_void_return
- return_arrow_whitespace
- statement_position
- switch_case_alignment
- syntactic_sugar
- trailing_comma
- trailing_newline
- trailing_semicolon
- trailing_whitespace
- unavailable_condition
- unneeded_override
- unneeded_synthesized_initializer
- unused_optional_binding
- unused_setter_value
- vertical_parameter_alignment
- vertical_whitespace
- void_function_in_ternary
- void_return
- file_header
- redundant_type_annotation
- closing_brace
- closure_end_indentation
- contains_over_filter_count
- contains_over_filter_is_empty
- contains_over_first_not_nil
- contains_over_range_nil_comparison
- empty_collection_literal
- empty_count
- empty_string
- empty_xctest_method
- explicit_init
- first_where
- discouraged_assert
- duplicate_imports
- duplicate_enum_cases
- last_where
- modifier_order
- multiline_arguments
- opening_brace
- overridden_super_call
- vertical_parameter_alignment_on_call
- vertical_whitespace_closing_braces
- vertical_whitespace_opening_braces
- yoda_condition
- accessibility_label_for_image
- accessibility_trait_for_button
- force_cast
- closure_body_length
- function_body_length
- implicitly_unwrapped_optional
- prefer_type_checking
- attribute_name_spacing
- unneeded_break_in_switch
- multiline_parameters
line_length:
warning: 125
ignores_urls: true
ignores_interpolated_strings: true
closure_body_length:
warning: 34
error: 34
function_body_length:
warning: 122
error: 122
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/
redundant_type_annotation:
consider_default_literal_types_redundant: true
analyzer_rules: # Rules run by `swiftlint analyze`
- unused_import
excluded: # paths to ignore during linting. Takes precedence over `included`.
# Firefox specific
- build/
- .build/
- test-fixtures/tmp
- DerivedData/
# Package.swift files need a custom header for swift-tools-version
# so must be excluded due to file_header rule
- Package.swift
- Tests/
included:
- /Users/vagrant/git
- .
# reporter: "json" # reporter type (xcode, json, csv, checkstyle)
reporter: "xcode" # reporter type (xcode, json, csv, checkstyle)