-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.swiftlint.yml
140 lines (139 loc) · 6.4 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
128
129
130
131
132
133
134
135
136
137
138
139
140
#
# .swiftlint.yml
#
# Copyright © 2021 Ten Percent Happier. All rights reserved.
#
# MICROSOFT REFERENCE SOURCE LICENSE (MS-RSL)
# This license governs use of the accompanying software. If you use the software, you accept this license.
# If you do not accept the license, do not use the software.
#
# https://referencesource.microsoft.com/license.html
#
# 1. Definitions
# - The terms "reproduce," "reproduction" and "distribution" have the same meaning here as under U.S.
# copyright law.
# - "You" means the licensee of the software.
# - "Your company" means the company you worked for when you downloaded the software.
# - "Reference use" means use of the software within your company as a reference, in read only form, for the
# sole purposes of debugging your products, maintaining your products, or enhancing the interoperability
# of your products with the software, and specifically excludes the right to distribute the software
# outside of your company.
#
# 2. Grant of Rights
# (A) Copyright Grant- Subject to the terms of this license, the Licensor grants you a non-transferable,
# non-exclusive, worldwide, royalty-free copyright license to reproduce the software for reference use.
# (B) Patent Grant- Subject to the terms of this license, the Licensor grants you a non-transferable,
# non-exclusive, worldwide, royalty-free patent license under licensed patents for reference use.
#
# 3. Limitations
# (A) No Trademark License- This license does not grant you any rights to use the Licensor's name, logo, or
# trademarks.
# (B) If you begin patent litigation against the Licensor over patents that you think may apply to the
# software (including a cross-claim or counterclaim in a lawsuit), your license to the software
# non-exclusive,
# (C) The software is licensed "as-is." You bear the risk of using it. The Licensor gives no express
# warranties, guarantees or conditions. You may have additional consumer rights under your local laws
# which this license cannot change. To the extent permitted under your local laws, the Licensor excludes
# the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
#
included:
- Meditations
- MeditationsTests
- MeditationsUITests
excluded:
- Pods
disabled_rules:
- valid_ibinspectable
- implicit_getter
- trailing_whitespace
- line_length
- nesting
- todo
- statement_position
- force_cast
- unused_setter_value
- notification_center_detachment
- large_tuple
- cyclomatic_complexity
- multiple_closures_with_trailing_closure
- empty_count
opt_in_rules:
- empty_count
- empty_string
- file_header
force_cast: warning # implicitly
force_try:
severity: warning # explicitly
line_length:
warning: 110
ignores_function_declarations: true
ignores_urls: true
function_body_length:
warning: 120
error: 400
no_space_in_method_call: enabled
operator_usage_whitespace: enabled
function_parameter_count:
warning: 7
error: 8
identifier_name:
min_length: 2
max_length:
warning: 50
error: 60
type_name:
min_length: 3
max_length:
warning: 40
error: 50
type_body_length:
warning: 500
error: 800
file_length:
warning: 900
error: 1500
ignore_comment_only_lines: true
cyclomatic_complexity:
warning: 15
error: 25
reporter: "xcode" # reporter type (xcode, json, csv, checkstyle, junit, html, emoji)
file_header:
required_pattern: |
\/\/
\/\/ SWIFTLINT_CURRENT_FILENAME
\/\/
\/\/ Copyright © 2021 Ten Percent Happier. All rights reserved.
\/\/
\/\/ MICROSOFT REFERENCE SOURCE LICENSE \(MS-RSL\)
\/\/ This license governs use of the accompanying software. If you use the software, you accept this license.
\/\/ If you do not accept the license, do not use the software.
\/\/
\/\/ https:\/\/referencesource.microsoft.com\/license.html
\/\/
\/\/ 1. Definitions
\/\/ - The terms "reproduce," "reproduction" and "distribution" have the same meaning here as under U.S.
\/\/ copyright law.
\/\/ - "You" means the licensee of the software.
\/\/ - "Your company" means the company you worked for when you downloaded the software.
\/\/ - "Reference use" means use of the software within your company as a reference, in read only form, for the
\/\/ sole purposes of debugging your products, maintaining your products, or enhancing the interoperability
\/\/ of your products with the software, and specifically excludes the right to distribute the software
\/\/ outside of your company.
\/\/
\/\/ 2. Grant of Rights
\/\/ \(A\) Copyright Grant- Subject to the terms of this license, the Licensor grants you a non-transferable,
\/\/ non-exclusive, worldwide, royalty-free copyright license to reproduce the software for reference use.
\/\/ \(B\) Patent Grant- Subject to the terms of this license, the Licensor grants you a non-transferable,
\/\/ non-exclusive, worldwide, royalty-free patent license under licensed patents for reference use.
\/\/
\/\/ 3. Limitations
\/\/ \(A\) No Trademark License- This license does not grant you any rights to use the Licensor's name, logo, or
\/\/ trademarks.
\/\/ \(B\) If you begin patent litigation against the Licensor over patents that you think may apply to the
\/\/ software \(including a cross-claim or counterclaim in a lawsuit\), your license to the software
\/\/ non-exclusive,
\/\/ \(C\) The software is licensed "as-is." You bear the risk of using it. The Licensor gives no express
\/\/ warranties, guarantees or conditions. You may have additional consumer rights under your local laws
\/\/ which this license cannot change. To the extent permitted under your local laws, the Licensor excludes
\/\/ the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
\/\/