Ios SwiftLint:无法强制转换类型为';Swift.Int64';至';Swift.String';,造雨燕

Ios SwiftLint:无法强制转换类型为';Swift.Int64';至';Swift.String';,造雨燕,ios,cocoapods,swift4,xcode9,swiftlint,Ios,Cocoapods,Swift4,Xcode9,Swiftlint,我正在将Swiftlint与我在Xcode 9、Swift 4中的项目集成 我用椰子荚安装了swiftlint。我的播客文件如下所示: # Uncomment the next line to define a global platform for your project platform :ios, '10.0' target 'my_target' do # Comment the next line if you're not using Swift and don't w

我正在将Swiftlint与我在Xcode 9、Swift 4中的项目集成

我用椰子荚安装了swiftlint。我的播客文件如下所示:

# Uncomment the next line to define a global platform for your project
 platform :ios, '10.0'

target 'my_target' do
    # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
    use_frameworks!

    # Pods for my_target

    # https://github.com/Alamofire/Alamofire
    pod 'Alamofire'

    # https://fabric.io/kits/ios
    pod 'Fabric'

    # https://github.com/realm/SwiftLint
    pod 'SwiftLint'

end
尝试构建项目时,我看到以下错误:

无法将类型为“Swift.Int64”(0x10ff35f80)的值强制转换为 “Swift.String”(0x10ff3c4d8)

pods中安装的版本为0.25.1
为什么会发生这种情况?

您很可能使用了错误版本的SwiftLint

撰写本文时,最新版本为
0.25.1

您可以在此处看到最新版本:

要查看正在运行的版本,请执行以下操作:
swiftlint version

SwiftLint不是通过CoCoapod安装的

要升级到最新版本,请执行以下操作:

  • 删除SwiftLint:
    brew卸载SwiftLint

  • 安装SwiftLint:
    brew安装SwiftLint