-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.swiftlint.yml
More file actions
83 lines (68 loc) · 2.32 KB
/
Copy path.swiftlint.yml
File metadata and controls
83 lines (68 loc) · 2.32 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
# By default, SwiftLint uses a set of sensible default rules you can adjust. Find all the available rules
# by running `swiftlint rules` or visiting https://realm.github.io/SwiftLint/rule-directory.html.
# Rules turned on by default can be disabled.
disabled_rules:
- function_body_length
- function_parameter_count
- identifier_name
- large_tuple
- trailing_whitespace
# Rules turned off by default can be enabled.
opt_in_rules:
- contains_over_filter_count
- empty_count
- first_where
- force_unwrapping
- for_where
- implicit_return
- prefer_self_in_static_references
- private_over_fileprivate
- sorted_first_last
# Case-sensitive paths to include during linting. Directory paths supplied on the
# command line will be ignored. Wildcards are supported.
included:
- Sources
- Tests
# Case-sensitive paths to ignore during linting. Takes precedence over `included`. Wildcards
# are supported.
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 treat all errors as warnings.
lenient: false
# If true, SwiftLint will check for updates after linting or analyzing.
check_for_updates: true
# Configurable rules can be customized. All rules support setting their severity level.
force_cast: warning # implicitly
force_try:
severity: warning # explicitly
trailing_comma:
mandatory_comma: true
# Rules that have both warning and error levels can set just the warning level implicitly.
line_length: 200
# To set both levels implicitly, use an array.
type_body_length:
- 1000 # warning
- 2000 # error
# To set both levels explicitly, use a dictionary.
file_length:
warning: 2000
error: 3000
# Naming rules can set warnings/errors for `min_length` and `max_length`. Additionally, they can
# set excluded names and allowed symbols.
type_name:
min_length: 3
max_length:
warning: 60
error: 70
allowed_symbols: ["_"]
cyclomatic_complexity:
warning: 20
error: 40
# The default reporter (SwiftLint's output format) can be configured as `checkstyle`, `codeclimate`, `csv`,
# `emoji`, `github-actions-logging`, `gitlab`, `html`, `json`, `junit`, `markdown`, `relative-path`, `sarif`,
# `sonarqube`, `summary`, or `xcode` (default).
reporter: "xcode"