forked from dyerc/Doughnut
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.swiftlint.yml
78 lines (71 loc) · 2.75 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
# This file is based on the Airbnb's Swift Style Guide
# https://github.com/airbnb/swift/blob/master/Sources/AirbnbSwiftFormatTool/swiftlint.yml
only_rules:
- closure_spacing
- colon
- empty_enum_arguments
- extension_access_modifier
- fatal_error_message
- file_header
- force_try
- generic_type_name
- implicit_getter
- legacy_cggeometry_functions
- legacy_constant
- legacy_constructor
- legacy_nsgeometry_functions
- operator_usage_whitespace
- pattern_matching_keywords
- redundant_string_enum_value
- redundant_void_return
- return_arrow_whitespace
- sorted_imports
- switch_case_alignment
- trailing_comma
- trailing_newline
- trailing_semicolon
- trailing_whitespace
- type_name
- unused_closure_parameter
- unused_optional_binding
- vertical_whitespace
- void_return
- custom_rules
excluded:
- Pods
colon:
apply_to_dictionaries: true
indentation: 2
trailing_comma:
mandatory_comma: true
file_header:
required_pattern: |
\/\*
\ \* Doughnut Podcast Client
\ \* Copyright \(C\) 2017 - 2022 Chris Dyer
\ \*
\ \* This program is free software: you can redistribute it and\/or modify
\ \* it under the terms of the GNU General Public License as published by
\ \* the Free Software Foundation, either version 3 of the License, or
\ \* \(at your option\) any later version\.
\ \*
\ \* This program is distributed in the hope that it will be useful,
\ \* but WITHOUT ANY WARRANTY; without even the implied warranty of
\ \* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\. See the
\ \* GNU General Public License for more details\.
\ \*
\ \* You should have received a copy of the GNU General Public License
\ \* along with this program\. If not, see <http:\/\/www\.gnu\.org\/licenses\/>\.
custom_rules:
no_objcMembers:
name: "@objcMembers"
regex: "@objcMembers"
message: "Explicitly use @objc on each member you want to expose to Objective-C"
severity: error
no_direct_standard_out_logs:
name: "Writing log messages directly to standard out is disallowed"
regex: "(\\bprint|\\bdebugPrint|\\bdump|Swift\\.print|Swift\\.debugPrint|Swift\\.dump)\\s*\\("
match_kinds:
- identifier
message: "Don't commit `print(…)`, `debugPrint(…)`, or `dump(…)` as they write to standard out in release. Either log to a dedicated logging system or silence this warning in debug-only scenarios explicitly using `// swiftlint:disable:next no_direct_standard_out_logs`"
severity: warning