-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
discussionTopics that cannot be categorized as bugs or enhancements yet. They require further discussions.Topics that cannot be categorized as bugs or enhancements yet. They require further discussions.enhancementIdeas for improvements of existing features and rules.Ideas for improvements of existing features and rules.
Description
New Issue Checklist
- I've Updated SwiftLint to the latest version.
- I've searched for existing GitHub issues.
Bug Description
Since 0.63, vertical_whitespace_between_cases considers inline comments in whether a newline is needed. For example, previously, this produced no warning with the setting enabled, as the cases were handled in a single line.
switch myEnum {
case .a: print("a")
// Now we handle b.
case .b: print("b")
}However, now it requires a newline before the comment, despite the fact that the structure of the actual code doesn't trigger the warning.
switch myEnum {
case .a: print("a")
// Now we handle b.
case .b: print("b")
}It seems to me that only the structure of the switch itself should be considered when determining the newline requirement, as was the case before. If this was an intentional change, perhaps an additional parameter can be added for better control?
Environment
- SwiftLint version: 0.63.0
- Xcode version: 26.2
- Installation method used: CocoaPods
- Configuration file: directly enabled the rule, no configuration yet.
Metadata
Metadata
Assignees
Labels
discussionTopics that cannot be categorized as bugs or enhancements yet. They require further discussions.Topics that cannot be categorized as bugs or enhancements yet. They require further discussions.enhancementIdeas for improvements of existing features and rules.Ideas for improvements of existing features and rules.