Skip to content

Commit

Permalink
Fixed flexible_right_spacing to Bool instead of Int.
Browse files Browse the repository at this point in the history
  • Loading branch information
freak4pc committed Jul 28, 2016
1 parent 08c5b41 commit c963aad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/SwiftLintFramework/Rules/ColonRule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public struct ColonRule: CorrectableRule, ConfigurationProviderRule {
public var flexibleRightSpacing = false

public init(configuration: AnyObject) throws {
flexibleRightSpacing = configuration["flexible_right_spacing"] as? Int == 1
flexibleRightSpacing = configuration["flexible_right_spacing"] as? Bool == true
}

public var configurationDescription: String {
Expand Down
2 changes: 1 addition & 1 deletion Tests/SwiftLintFramework/RulesTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class RulesTests: XCTestCase {
]
)

verifyRule(description, ruleConfiguration: ["flexible_right_spacing": 1])
verifyRule(description, ruleConfiguration: ["flexible_right_spacing": true])
}
// swiftlint:enable function_body_length

Expand Down

0 comments on commit c963aad

Please sign in to comment.