Add SwiftLint (#49)
This change adds SwiftLint to the project. For now, the rules are tweaked to match the current state of the code base — but will over time be changed back to their defaults in several cases. Some smaller changes (mostly related to code style) were applied to the project to remove all warnings.
This commit is contained in:
parent
892d6ae39c
commit
8bc46cbeb0
|
@ -0,0 +1,7 @@
|
|||
disabled_rules:
|
||||
- nesting
|
||||
line_length: 200
|
||||
function_body_length: 100
|
||||
type_body_length: 600
|
||||
file_length: 800
|
||||
cyclomatic_complexity: 15
|
|
@ -21,7 +21,10 @@ public struct Theme {
|
|||
/// What color to use for the text's highlighted tokens
|
||||
public var tokenColors: [TokenType: Color]
|
||||
|
||||
public init(font: Font, plainTextColor: Color, tokenColors: [TokenType : Color], backgroundColor: Color = Color(white: 0.12, alpha: 1)) {
|
||||
public init(font: Font,
|
||||
plainTextColor: Color,
|
||||
tokenColors: [TokenType: Color],
|
||||
backgroundColor: Color = Color(white: 0.12, alpha: 1)) {
|
||||
self.font = font
|
||||
self.plainTextColor = plainTextColor
|
||||
self.tokenColors = tokenColors
|
||||
|
|
|
@ -29,4 +29,3 @@ extension TokenTypeTests {
|
|||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue