macos: swiftlint 'switch_case_alignment' rule (#10908)

pull/10915/head
Mitchell Hashimoto 2026-02-20 21:02:46 -08:00 committed by GitHub
commit ce46caeacb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 13 deletions

View File

@ -21,7 +21,6 @@ disabled_rules:
- for_where
- force_cast
- multiple_closures_with_trailing_closure
- switch_case_alignment
identifier_name:
min_length: 1

View File

@ -7,14 +7,14 @@ enum QuickTerminalSpaceBehavior {
init?(fromGhosttyConfig string: String) {
switch string {
case "move":
self = .move
case "move":
self = .move
case "remain":
self = .remain
case "remain":
self = .remain
default:
return nil
default:
return nil
}
}
@ -25,12 +25,12 @@ enum QuickTerminalSpaceBehavior {
]
switch self {
case .move:
// We want this to move the window to the active space.
return NSWindow.CollectionBehavior([.canJoinAllSpaces] + commonBehavior)
case .remain:
// We want this to remain the window in the current space.
return NSWindow.CollectionBehavior([.moveToActiveSpace] + commonBehavior)
case .move:
// We want this to move the window to the active space.
return NSWindow.CollectionBehavior([.canJoinAllSpaces] + commonBehavior)
case .remain:
// We want this to remain the window in the current space.
return NSWindow.CollectionBehavior([.moveToActiveSpace] + commonBehavior)
}
}
}