-
-
Notifications
You must be signed in to change notification settings - Fork 391
Expand file tree
/
Copy path.swiftlint.yml
More file actions
executable file
·129 lines (124 loc) · 2.73 KB
/
.swiftlint.yml
File metadata and controls
executable file
·129 lines (124 loc) · 2.73 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
excluded:
- Pods
- DerivedData
- "**/SourcePackages/**"
- Utils/**/.build
- Samples/**/.build
- "**/build/**"
- DependencyManagerTests
- Sources/SentryCrash
- vendor
- test-server/.build/
- Tests/Perf
- SentryTestUtils/Dynamic/**
- .build/**
- .git/**
- XCFrameworkBuildPath/**
- 3rd-party-integrations/**/Packages/sentry-cocoa
- 3rd-party-integrations/**/.build
# Exclude auto-generated files from sample app builds
- "**/Build/Intermediates.noindex/iOS-Swift.build/**/DerivedSources/**"
- "**/Build/Intermediates.noindex/iOS-SwiftClip.build/**/DerivedSources/**"
only_rules:
- class_delegate_protocol
- closing_brace
- closure_end_indentation
- closure_parameter_position
- closure_spacing
- colon
- comma
- compiler_protocol_init
- control_statement
- custom_rules
- cyclomatic_complexity
- dynamic_inline
- empty_parameters
- empty_parentheses_with_trailing_closure
- explicit_init
- file_length
- first_where
- force_cast
- force_try
- force_unwrapping
- function_body_length
- function_name_whitespace
- generic_type_name
- implicit_getter
- large_tuple
- leading_whitespace
- legacy_cggeometry_functions
- legacy_constant
- legacy_constructor
- legacy_nsgeometry_functions
- line_length
- mark
- missing_docs
- nimble_operator
- number_separator
- opening_brace
- operator_usage_whitespace
- overridden_super_call
- private_outlet
- private_unit_test
- prohibited_super_call
- redundant_nil_coalescing
- implicit_optional_initialization
- redundant_string_enum_value
- redundant_void_return
- return_arrow_whitespace
- shorthand_operator
- sorted_imports
- statement_position
- syntactic_sugar
- todo
- trailing_comma
- trailing_newline
- trailing_semicolon
- type_body_length
- type_name
- unused_closure_parameter
- unused_enumerated
- unused_optional_binding
- valid_ibinspectable
- identifier_name
- vertical_parameter_alignment
- vertical_whitespace
- void_return
- weak_delegate
- yoda_condition
- non_optional_string_data_conversion
identifier_name:
allowed_symbols:
- i
- _
min_length:
- 1
max_length:
warning: 50
error: 50
line_length:
- 1000
type_name:
min_length:
- 2
- 1
max_length:
warning: 60
error: 60
large_tuple:
- 3
missing_docs:
warning: [open, public]
evaluate_effective_access_control_level: true
excludes_extensions: false
excludes_inherited_types: false
excludes_trivial_init: false
severity: error
custom_rules:
no_try_optional_in_tests:
name: "No try? in tests"
message: "Avoid `try?` in tests. Use `try XCTUnwrap(...)` instead."
regex: 'try\?'
severity: error
included:
- "./Tests/.*\\.swift"