我有一个日志方法,它不可避免地会被一个违反SwiftLint的hardcoded_string规则的参数调用:
Logger.log("This will be a hardcoded string usually")我知道我每次都可以使用swiftlint:disable:next,但是是否可以在Logger类定义中指定swiftlint应该总是忽略这个特定的参数?类似于:
/// Implementation of Logger
/// Logs a message
/// - Parameter messsage: The message to log swiftlint:disable hardcoded_string
func log(_ message: String) { ... }发布于 2020-10-27 19:38:19
你可以写下这行
// swiftlint:disable force_casthttps://stackoverflow.com/questions/64552839
复制相似问题