diff --git a/.swift-format b/.swift-format index 41a022f26..176687e28 100644 --- a/.swift-format +++ b/.swift-format @@ -13,6 +13,8 @@ "NoBlockComments": false, "OrderedImports": true, "UseLetInEveryBoundCaseVariable": false, - "UseSynthesizedInitializer": false + "UseSynthesizedInitializer": false, + "ReturnVoidInsteadOfEmptyTuple": true, + "NoVoidReturnOnFunctionSignature": true, } } diff --git a/Sources/swift-format/Frontend/FormatFrontend.swift b/Sources/swift-format/Frontend/FormatFrontend.swift index a205b6405..0e8fca9d2 100644 --- a/Sources/swift-format/Frontend/FormatFrontend.swift +++ b/Sources/swift-format/Frontend/FormatFrontend.swift @@ -40,7 +40,7 @@ class FormatFrontend: Frontend { return } - let diagnosticHandler: (SwiftDiagnostics.Diagnostic, SourceLocation) -> () = { + let diagnosticHandler: (SwiftDiagnostics.Diagnostic, SourceLocation) -> Void = { (diagnostic, location) in guard !self.lintFormatOptions.ignoreUnparsableFiles else { // No diagnostics should be emitted in this mode.