-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.swiftlint.yml
127 lines (115 loc) · 3.21 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
121
122
123
124
125
126
127
# SwiftLint configuration file for the Storybook repository.
# Run `swiftlint --fix` at the root of the repository to format all code.
# MARK: - Settings
#included:
# - *.swift
excluded:
- "**/.build"
# If true, SwiftLint will not fail if no lintable files are found.
allow_zero_lintable_files: false
# If true, SwiftLint will treat all warnings as errors.
strict: false
# If true, SwiftLint will check for updates after linting or analyzing.
check_for_updates: true
# reporter type (xcode, json, csv, checkstyle, codeclimate, junit, html, emoji, sonarqube, markdown, github-actions-logging, summary)
reporter: "xcode"
# MARK: - Rules
disabled_rules:
- class_delegate_protocol
- cyclomatic_complexity
- discouraged_direct_init
- duplicate_enum_cases
- function_parameter_count
- inclusive_language
- large_tuple
- line_length
- multiple_closures_with_trailing_closure
- nesting
- non_optional_string_data_conversion
- notification_center_detachment
- shorthand_operator
- todo
- type_body_length
- type_name
- void_function_in_ternary
opt_in_rules:
- 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_none_name
- discouraged_object_literal
- discouraged_optional_boolean
- discouraged_optional_collection
- empty_collection_literal
- empty_count
- empty_string
- explicit_init
- fatal_error_message
- file_name_no_space
- first_where
- identical_operands
- implicit_return
- indentation_width
- joined_default_parameter
- last_where
- legacy_multiple
- literal_expression_end_indentation
- lower_acl_than_parent
- modifier_order
- multiline_arguments
- multiline_arguments_brackets
- multiline_literal_brackets
- multiline_parameters
- multiline_parameters_brackets
- number_separator
- operator_usage_whitespace
- optional_enum_case_matching
- overridden_super_call
- override_in_extension
- prefer_self_type_over_type_of_self
- prefer_zero_over_explicit_init
- private_swiftui_state
- raw_value_for_camel_cased_codable_enum
- redundant_nil_coalescing
- return_value_from_void_function
- shorthand_optional_binding
- sorted_enum_cases
- sorted_first_last
- sorted_imports
- toggle_bool
- unhandled_throwing_task
- unneeded_parentheses_in_closure_argument
- unowned_variable_capture
- vertical_parameter_alignment_on_call
- vertical_whitespace_closing_braces
- yoda_condition
analyzer_rules:
- unused_declaration
- unused_import
# MARK: - Config
file_length:
warning: 750
error: 1500
ignore_comment_only_lines: true
force_cast:
severity: warning
force_try:
severity: warning
function_body_length:
warning: 100
error: 200
identifier_name:
min_length: 0
opening_brace:
- ignore_multiline_statement_conditions
trailing_comma:
mandatory_comma: true
unused_declaration:
severity: warning