1
+ # By default, SwiftLint uses a set of sensible default rules you can adjust:
2
+ disabled_rules : # rule identifiers turned on by default to exclude from running
3
+ - colon
4
+ - comma
5
+ - control_statement
6
+ opt_in_rules : # some rules are turned off by default, so you need to opt-in
7
+ - empty_count # Find all the available rules by running: `swiftlint rules`
8
+
9
+ # Alternatively, specify all rules explicitly by uncommenting this option:
10
+ # only_rules: # delete `disabled_rules` & `opt_in_rules` if using this
11
+ # - empty_parameters
12
+ # - vertical_whitespace
13
+
14
+ included : # paths to include during linting. `--path` is ignored if present.
15
+ - Monotone
16
+ excluded : # paths to ignore during linting. Takes precedence over `included`.
17
+ - Carthage
18
+ - Pods
19
+ # - Source/ExcludedFolder
20
+ # - Source/ExcludedFile.swift
21
+ # - Source/*/ExcludedFile.swift # Exclude files with a wildcard
22
+ analyzer_rules : # Rules run by `swiftlint analyze` (experimental)
23
+ - explicit_self
24
+
25
+ # configurable rules can be customized from this configuration file
26
+ # binary rules can set their severity level
27
+ force_cast : warning # implicitly
28
+ force_try :
29
+ severity : warning # explicitly
30
+ # rules that have both warning and error levels, can set just the warning level
31
+ # implicitly
32
+ line_length : 110
33
+ # they can set both implicitly with an array
34
+ type_body_length :
35
+ - 300 # warning
36
+ - 400 # error
37
+ # or they can set both explicitly
38
+ file_length :
39
+ warning : 500
40
+ error : 1200
41
+ # naming rules can set warnings/errors for min_length and max_length
42
+ # additionally they can set excluded names
43
+ type_name :
44
+ min_length : 4 # only warning
45
+ max_length : # warning and error
46
+ warning : 40
47
+ error : 50
48
+ excluded : iPhone # excluded via string
49
+ allowed_symbols : ["_"] # these are allowed in type names
50
+ identifier_name :
51
+ min_length : # only min_length
52
+ error : 4 # only error
53
+ excluded : # excluded via string array
54
+ - id
55
+ - URL
56
+ - GlobalAPIKey
57
+ reporter : " html" # reporter type (xcode, json, csv, checkstyle, codeclimate, junit, html, emoji, sonarqube, markdown, github-actions-logging)
0 commit comments