mirror of
https://github.com/realm/SwiftLint.git
synced 2026-06-06 20:18:40 +00:00
* Skip correcting files with parser diagnostics Also fix many rule examples with parser diagnostics. * Sourcery * Link to issue in changelog entry
15 lines
478 B
Swift
15 lines
478 B
Swift
@testable import SwiftLintFramework
|
|
import XCTest
|
|
|
|
final class ParserDiagnosticsTests: XCTestCase {
|
|
func testFileWithParserDiagnostics() {
|
|
parserDiagnosticsDisabledForTests = false
|
|
XCTAssertNotNil(SwiftLintFile(contents: "importz Foundation").parserDiagnostics)
|
|
}
|
|
|
|
func testFileWithoutParserDiagnostics() {
|
|
parserDiagnosticsDisabledForTests = false
|
|
XCTAssertNil(SwiftLintFile(contents: "import Foundation").parserDiagnostics)
|
|
}
|
|
}
|