Procházet zdrojové kódy

Disable swift-lint rule for a line

Florian Friedrich před 5 roky
rodič
revize
b3071515a7

+ 0 - 4
.swiftlint.yml

@@ -6,9 +6,5 @@ opt_in_rules:
   - empty_count
   - force_unwrapping
 
-identifier_name:
-  allowed_symbols:
-    - "_"
-
 nesting:
   type_level: 4

+ 4 - 0
Sources/CocoaLumberjackSwiftLogBackend/DDLogHandler.swift

@@ -70,8 +70,12 @@ extension DDLogMessage {
 /// It's basically an implementation detail of `DDLogMessage.swiftLogInfo`.
 @usableFromInline
 final class SwiftLogMessage: DDLogMessage {
+    // SwiftLint doesn't like that this starts with an underscore.
+    // It only tolerates that for private vars, but this cant' be private (because @usableFromInline).
+    // swiftlint:disable identifier_name
     @usableFromInline
     let _swiftLogInfo: SwiftLogInformation
+    // swiftlint:enable identifier_name
 
     @usableFromInline
     init(loggerLabel: String,