Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error on Xcode 7.3 beta 2 (Swift 2.2) #425

Closed
norio-nomura opened this issue Jan 27, 2016 · 1 comment
Closed

Build error on Xcode 7.3 beta 2 (Swift 2.2) #425

norio-nomura opened this issue Jan 27, 2016 · 1 comment

Comments

@norio-nomura
Copy link
Collaborator

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

😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants