mirror of
https://github.com/realm/SwiftLint.git
synced 2026-06-06 20:18:40 +00:00
087278c052
It's supposed to test code from SwiftLintCore.
28 lines
918 B
Swift
28 lines
918 B
Swift
@testable import SwiftLintBuiltInRules
|
|
import TestHelpers
|
|
|
|
final class RulesTests: SwiftLintTestCase {
|
|
func testLeadingWhitespace() {
|
|
verifyRule(LeadingWhitespaceRule.description, skipDisableCommandTests: true,
|
|
testMultiByteOffsets: false, testShebang: false)
|
|
}
|
|
|
|
func testMark() {
|
|
verifyRule(MarkRule.description, skipCommentTests: true)
|
|
}
|
|
|
|
func testRequiredEnumCase() {
|
|
let configuration = ["NetworkResponsable": ["notConnected": "error"]]
|
|
verifyRule(RequiredEnumCaseRule.description, ruleConfiguration: configuration)
|
|
}
|
|
|
|
func testTrailingNewline() {
|
|
verifyRule(TrailingNewlineRule.description, commentDoesntViolate: false,
|
|
stringDoesntViolate: false)
|
|
}
|
|
|
|
func testOrphanedDocComment() {
|
|
verifyRule(OrphanedDocCommentRule.description, commentDoesntViolate: false, skipCommentTests: true)
|
|
}
|
|
}
|