New Issue Checklist
Bug Description
Using the vertical_whitespace_between_cases rule, it seems to get confused when wrapping cases in an #if check.
enum Limited {
case a
#if DEBUG
case b
#endif
}
let l = Limited.a
switch l {
case .a: print("a")
#if DEBUG
case .b: print("b") // Vertical Whitespace Between Cases Violation: Include a single empty line between switch cases (vertical_whitespace_between_cases)
#endif
}
Additionally, trying to disable the diagnostic with swiftlint:disable:this produces a "Superfluous Disable Command Violation" warning.
Environment
- SwiftLint: 0.62.2
- Xcode: Xcode 26.1 Build version 17B54
- Installation method: CocoaPods