macos: swiftlint 'comment_spacing' rule

This commit is contained in:
Jon Parise
2026-02-19 18:34:02 -05:00
parent 6ade5df799
commit a8903c1bb1
6 changed files with 16 additions and 17 deletions

View File

@@ -13,7 +13,6 @@ disabled_rules:
- type_body_length
# TODO
- comment_spacing
- control_statement
- deployment_target
- empty_enum_arguments

View File

@@ -166,7 +166,7 @@ class AppDelegate: NSObject,
ghostty.delegate = self
}
//MARK: - NSApplicationDelegate
// MARK: - NSApplicationDelegate
func applicationWillFinishLaunching(_ notification: Notification) {
UserDefaults.standard.register(defaults: [
@@ -887,7 +887,7 @@ class AppDelegate: NSObject,
Note: When `auto-update = download`, you may need to
`Clean Build Folder` if a background install has already begun.
*/
//updateController.updater.checkForUpdatesInBackground()
// updateController.updater.checkForUpdatesInBackground()
}
// Config could change keybindings, so update everything that depends on that
@@ -1022,7 +1022,7 @@ class AppDelegate: NSObject,
UserDefaults.standard.set(currentBuild, forKey: "CustomGhosttyIconBuild")
}
//MARK: - Restorable State
// MARK: - Restorable State
/// We support NSSecureCoding for restorable state. Required as of macOS Sonoma (14) but a good idea anyways.
func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
@@ -1058,7 +1058,7 @@ class AppDelegate: NSObject,
}
}
//MARK: - UNUserNotificationCenterDelegate
// MARK: - UNUserNotificationCenterDelegate
func userNotificationCenter(
_ center: UNUserNotificationCenter,
@@ -1079,7 +1079,7 @@ class AppDelegate: NSObject,
withCompletionHandler(options)
}
//MARK: - GhosttyAppDelegate
// MARK: - GhosttyAppDelegate
func findSurface(forUUID uuid: UUID) -> Ghostty.SurfaceView? {
for c in TerminalController.all {
@@ -1093,7 +1093,7 @@ class AppDelegate: NSObject,
return nil
}
//MARK: - Dock Menu
// MARK: - Dock Menu
private func reloadDockMenu() {
let newWindow = NSMenuItem(title: "New Window", action: #selector(newWindow), keyEquivalent: "")
@@ -1104,7 +1104,7 @@ class AppDelegate: NSObject,
dockMenu.addItem(newTab)
}
//MARK: - Global State
// MARK: - Global State
func setSecureInput(_ mode: Ghostty.SetSecureInput) {
let input = SecureInput.shared
@@ -1122,7 +1122,7 @@ class AppDelegate: NSObject,
UserDefaults.standard.set(input.global, forKey: "SecureInput")
}
//MARK: - IB Actions
// MARK: - IB Actions
@IBAction func openConfig(_ sender: Any?) {
Ghostty.App.openConfig()
@@ -1134,7 +1134,7 @@ class AppDelegate: NSObject,
@IBAction func checkForUpdates(_ sender: Any?) {
updateController.checkForUpdates()
//UpdateSimulator.happyPath.simulate(with: updateViewModel)
// UpdateSimulator.happyPath.simulate(with: updateViewModel)
}
@IBAction func newWindow(_ sender: Any?) {

View File

@@ -24,7 +24,7 @@ class AboutController: NSWindowController, NSWindowDelegate {
window?.close()
}
//MARK: - First Responder
// MARK: - First Responder
@IBAction func close(_ sender: Any) {
self.window?.performClose(sender)

View File

@@ -28,7 +28,7 @@ class ClipboardConfirmationController: NSWindowController {
fatalError("init(coder:) is not supported for this view")
}
//MARK: - NSWindowController
// MARK: - NSWindowController
override func windowDidLoad() {
guard let window = window else { return }

View File

@@ -18,7 +18,7 @@ class ConfigurationErrorsController: NSWindowController, NSWindowDelegate, Confi
}
}
//MARK: - NSWindowController
// MARK: - NSWindowController
override func windowWillLoad() {
shouldCascadeWindows = false

View File

@@ -482,7 +482,7 @@ class TerminalController: BaseTerminalController, TabGroupCloseCoordinator.Contr
return controller
}
//MARK: - Methods
// MARK: - Methods
@objc private func ghosttyConfigDidChange(_ notification: Notification) {
// Get our managed configuration object out
@@ -994,7 +994,7 @@ class TerminalController: BaseTerminalController, TabGroupCloseCoordinator.Contr
tabColor: (window as? TerminalWindow)?.tabColor ?? .none)
}
//MARK: - NSWindowController
// MARK: - NSWindowController
override func windowWillLoad() {
// We do NOT want to cascade because we handle this manually from the manager.
@@ -1315,7 +1315,7 @@ class TerminalController: BaseTerminalController, TabGroupCloseCoordinator.Contr
ghostty.toggleTerminalInspector(surface: surface)
}
//MARK: - TerminalViewDelegate
// MARK: - TerminalViewDelegate
override func focusedSurfaceDidChange(to: Ghostty.SurfaceView?) {
super.focusedSurfaceDidChange(to: to)
@@ -1347,7 +1347,7 @@ class TerminalController: BaseTerminalController, TabGroupCloseCoordinator.Contr
}
}
//MARK: - Notifications
// MARK: - Notifications
@objc private func onMoveTab(notification: SwiftUI.Notification) {
guard let target = notification.object as? Ghostty.SurfaceView else { return }