@@ -3,52 +3,62 @@ public class Configuration: Codable {
3
3
/// The version of the configuration; used in case of breaking changes in the future.
4
4
public let version = 1
5
5
6
- // MARK: Common configuration
6
+ /// MARK: Common configuration
7
7
8
8
/// The maximum number of consecutive blank lines that may appear in a file.
9
9
public let maximumBlankLines = 1
10
10
11
- // The width of the horizontal tab in spaces.
12
- // Used when converting indentation type.
11
+ /// The width of the horizontal tab in spaces.
12
+ /// Used when converting indentation type.
13
13
public let tabWidth = 8
14
14
15
- // A string that represents a single level of indentation.
16
- // All indentation will be conducted in multiples of this string.
15
+ /// A string that represents a single level of indentation.
16
+ /// All indentation will be conducted in multiples of this string.
17
17
public let indentation = " "
18
18
19
- // MARK: Rule-specific configuration
19
+ /// MARK: Rule-specific configuration
20
20
21
+ /// Rules for limiting blank lines between members.
21
22
public let blankLineBetweenMembers = BlankLineBetweenMembersConfiguration ( )
22
23
24
+ /// Rules for adding backticks around special symbols in documentation comments.
23
25
public let surroundSymbolsWithBackticks = SurroundSymbolsWithBackticksConfiguration ( )
24
26
25
27
/// Constructs a Configuration with all default values.
26
28
public init ( ) { }
27
29
}
28
30
31
+ /// Configuration for the BlankLineBetweenMembers rule.
29
32
public struct BlankLineBetweenMembersConfiguration : Codable {
30
- // If true, blank lines are not required between single-line properties.
33
+ /// If true, blank lines are not required between single-line properties.
31
34
public let ignoreSingleLineProperties = true
32
35
}
33
36
34
37
// TODO(abl): Expand the whitelist and blacklist.
38
+ /// Configuration for the SurroundSymbolsWithBackticks rule.
35
39
public struct SurroundSymbolsWithBackticksConfiguration : Codable {
36
- // List of global symbols; added to the list of file-local symbols. Case-sensitive.
40
+ /// List of global symbols; added to the list of file-local symbols. Case-sensitive.
37
41
public let symbolWhitelist = [ " String " ]
38
42
39
- // List of symbols to ignore. Case-sensitive.
43
+ /// List of symbols to ignore. Case-sensitive.
40
44
public let symbolBlacklist = [
41
- " URL " // symbol name and capitalization is the same as the term.
45
+ " URL " , // symbol name and capitalization is the same as the term.
42
46
]
43
47
}
44
48
49
+ /// Configuration for the NoPlaygroundLiterals rule.
45
50
public struct NoPlaygroundLiteralsConfiguration : Codable {
46
51
public enum ResolveBehavior : String , Codable {
47
- case useUIColor // if not sure, use `UIColor` to replace `#colorLiteral`
48
- case useNSColor // if not sure, use `NSColor` to replace `#colorLiteral`
49
- case error // if not sure, raise an error
52
+ /// If not sure, use `UIColor` to replace `#colorLiteral`.
53
+ case useUIColor
54
+
55
+ /// If not sure, use `NSColor` to replace `#colorLiteral`.
56
+ case useNSColor
57
+
58
+ /// If not sure, raise an error.
59
+ case error
50
60
}
51
61
52
- // Resolution behavior to use when encountering an ambiguous `#colorLiteral`
62
+ /// Resolution behavior to use when encountering an ambiguous `#colorLiteral`.
53
63
public let resolveAmbiguousColor : ResolveBehavior = . useUIColor
54
64
}
0 commit comments