You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
vertical_whitespace_between_cases false positive with #if but can't be disabled #6332
Using the vertical_whitespace_between_cases rule, it seems to get confused when wrapping cases in an #if check.
enumLimited{casea#if DEBUGcaseb#endif}letl=Limited.aswitchl{case.a:print("a")#if DEBUGcase.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.
Activity
jshier commentedon Nov 1, 2025
This can be worked around, or perhaps fixed if you're okay with the style, by putting a newline after the
#if.