xcode显示了一些我的某些POD文件的警告,尤其是关于弃用变量的警告。
我已经有一个.swiftlint.yml文件,并且它与我的PODS文件夹在同一文件夹中。
这就是我的文件的样子:
excluded:
- Pods
- Localization
line_length: 200
type_body_length:
- 300 # warning
- 400 # error
file_length:
warning: 500
error: 1200
function_body_length:
warning: 50
error: 100
我不明白为什么当我排除它们时仍然显示这些警告。
以下将忽略POD文件。
excluded:
- Pods
您只需要确保您的.swiftlint.yml文件必须在项目的根路径上。
尝试
platform :ios
# ignore all warnings from all pods
inhibit_all_warnings!
# ignore warnings from a specific pod
pod 'SwiftLint', :inhibit_warnings => true