Skip to content

Commit 3f6fb5e

Browse files
authoredApr 4, 2022
Improve swift style + swiftlint (duckduckgo#1092)
Task/Issue URL: https://app.asana.com/0/0/1201986385932308/f Description: Implement style guide changes Update swift lint Fork style from RW repo with some added changes
1 parent 207ea9d commit 3f6fb5e

File tree

74 files changed

+1241
-116
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+1241
-116
lines changed
 

‎.swiftlint.yml

+44-9
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,56 @@
11

22
disabled_rules:
3-
- trailing_whitespace
3+
- discarded_notification_center_observer
4+
- notification_center_detachment
5+
- orphaned_doc_comment
6+
- todo
7+
- unused_capture_list
8+
9+
opt_in_rules:
10+
- closure_end_indentation
11+
- closure_spacing
12+
- colon
13+
- overridden_super_call
14+
- unused_import
15+
- fatal_error_message
16+
17+
force_cast: warning
18+
force_try: warning
19+
legacy_hashing: error
420

5-
# Rule Config
6-
line_length:
7-
warning: 150
8-
ignores_comments: true
921
identifier_name:
1022
min_length: 1
1123
max_length:
1224
warning: 40
1325
error: 60
26+
excluded:
27+
- i
28+
- id
29+
- x
30+
- y
31+
- z
32+
33+
line_length:
34+
warning: 150
35+
ignores_urls: true
36+
ignores_function_declarations: true
37+
ignores_comments: true
38+
39+
vertical_whitespace:
40+
max_empty_lines: 2
41+
42+
trailing_whitespace:
43+
ignores_empty_lines: true
44+
ignores_comments: true
45+
46+
private_over_fileprivate:
47+
validate_extensions: true
48+
1449
type_name:
15-
min_length: 3
16-
max_length:
17-
warning: 80
18-
error: 100
50+
min_length: 3
51+
max_length:
52+
warning: 80
53+
error: 100
1954

2055
# General Config
2156
excluded:

‎AtbUITests/AtbIntegrationTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class AtbIntegrationTests: XCTestCase {
137137

138138
}
139139

140-
fileprivate extension HttpRequest {
140+
private extension HttpRequest {
141141

142142
func queryParam(_ named: String) -> String? {
143143
return queryParams.first(where: { $0.0 == named })?.1

0 commit comments

Comments
 (0)
Please sign in to comment.