個人memo用文章
同時使用SwiftLint和Bundler時凸椿,務必注意把在.swiftlint.yml
中把vendor文件夾除外!牌废!
Xcode中莫名出現(xiàn)了一堆fastlane的報錯缔逛,懵逼了半天。
把build settings和build phase中的path翻了個底朝天也沒發(fā)現(xiàn)為什么vendor文件下的東西會編譯報錯尼桶。
最后終于想起來把報錯信息在Log中打印一遍。
Linting 'ScreengrabfileProtocol.swift' (306/332)
/Users/.../dev/.../vendor/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/swift/RubyCommand.swift:60:57: warning: Colon Violation: Colons should be next to the identifier when specifying a type and next to the key in dictionary literals. (colon)
/Users/.../dev/.../vendor/bundle/ruby/2.6.0/gems/fastlane-2.137.0/fastlane/swift/RubyCommand.swift:114:26: error: Empty Count Violation: Prefer checking `isEmpty` over comparing `count` to zero. (empty_count)
給個中指先...
excluded:
- Carthage
- Pods
...
- vendor
在.swiftlint.yml
文件中除外后搞定