-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
log:
SwiftLint/Source/SwiftLintFrameworkTests/IntegrationTests.swift:29:54: error: cannot convert value of type 'String' to expected argument type 'StaticString'
XCTFail($0.reason, file: $0.location.file!, line: UInt($0.location.line!))
That is expanding linting result into XCTFail() that introduced on #404:
class IntegrationTests: XCTestCase {
func testSwiftLintLints() {
// This is as close as we're ever going to get to a self-hosting linter.
let directory = (((__FILE__ as NSString)
.stringByDeletingLastPathComponent as NSString)
.stringByDeletingLastPathComponent as NSString)
.stringByDeletingLastPathComponent
NSFileManager.defaultManager().changeCurrentDirectoryPath(directory)
let config = Configuration(path: Configuration.fileName)
let swiftFiles = config.lintableFilesForPath("")
XCTAssert(swiftFiles.map({$0.path!}).contains(__FILE__), "current file should be included")
let violations = swiftFiles.flatMap {
Linter(file: $0, configuration: config).styleViolations
}
violations.forEach {
XCTFail($0.reason, file: $0.location.file!, line: UInt($0.location.line!))
}
}
}Related:
https://bugs.swift.org/browse/SR-308?jql=text%20~%20%22staticstring%22
swiftlang/swift#888
swiftlang/swift-corelibs-xctest#27
😢
Metadata
Metadata
Assignees
Labels
No labels