当前的SwiftLint规则:
file_length:
warning: 800
error: 1500误差

我跟踪了这个回答,但是错误并没有消失
// swiftlint:disable force_cast
import UIKit
class MyClass: UIViewController {
}
// swiftlint:enable force_cast如何忽略特定文件中的SwiftLint规则?
发布于 2020-03-23 17:09:54
规则名为file_length,因此必须禁用此规则:
// swiftlint:disable file_length
import UIKit
class MyClass: UIViewController {
}注意:// swiftlint:enable <rule>用于只在一个小代码块中忽略特定规则的情况(如单个函数)。如果要禁用文件范围中的规则,则不需要启用任何内容。
https://stackoverflow.com/questions/60818273
复制相似问题