Skip to content

Commit 1693f4f

Browse files
committed
Fix linter
1 parent bcfeaa6 commit 1693f4f

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

Sources/XCRemoteCache/Commands/Swiftc/SwiftcProductsGenerator.swift

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,16 @@ protocol SwiftcProductsGenerator {
4444
/// Products generator that doesn't create any swiftmodule. It is used in the compilation swift-frontend mocking, where
4545
/// only individual .o files are created and not .swiftmodule of -Swift.h (which is part of swift-frontend -emit-module invocation)
4646
class NoopSwiftcProductsGenerator: SwiftcProductsGenerator {
47-
func generateFrom(artifactSwiftModuleFiles: [SwiftmoduleFileExtension : URL], artifactSwiftModuleObjCFile: URL) throws -> SwiftcProductsGeneratorOutput {
48-
printWarning("Invoking module generation from NoopSwiftcProductsGenerator which does nothing. It might be an error of the swift-frontend mocking.")
49-
// TODO: Refactor API: this url is never used: NoopSwiftcProductsGenerator is intended only for the swift-frontend
47+
func generateFrom(
48+
artifactSwiftModuleFiles: [SwiftmoduleFileExtension : URL],
49+
artifactSwiftModuleObjCFile: URL
50+
) throws -> SwiftcProductsGeneratorOutput {
51+
printWarning("""
52+
Invoking module generation from NoopSwiftcProductsGenerator which does nothing. \
53+
It might be an error of the swift-frontend mocking.
54+
""")
55+
// TODO: Refactor API: this url is never used:
56+
// NoopSwiftcProductsGenerator is intended only for the swift-frontend
5057
let trivialURL = URL(fileURLWithPath: "/non-existing")
5158
return SwiftcProductsGeneratorOutput(swiftmoduleDir: trivialURL, objcHeaderFile: trivialURL)
5259
}

Sources/xcswift-frontend/XCSwiftFrontend.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,16 @@
2020
import Foundation
2121
import XCRemoteCache
2222

23-
/// Wrapper for a `swift-frontend` that skips compilation and produces empty output files (.o). As a compilation dependencies
23+
/// Wrapper for a `swift-frontend` that skips compilation and
24+
/// produces empty output files (.o). As a compilation dependencies
2425
/// (.d) file, it copies all dependency files from the prebuild marker file
2526
/// Fallbacks to a standard `swift-frontend` when the ramote cache is not applicable (e.g. modified sources)
2627
public class XCSwiftcFrontendMain {
27-
// swiftlint:disable:next function_body_length
28+
// swiftlint:disable:next function_body_length cyclomatic_complexity
2829
public func main() {
2930
let env = ProcessInfo.processInfo.environment
3031
let command = ProcessInfo().processName
3132
let args = ProcessInfo().arguments
32-
33-
3433
var compile = false
3534
var emitModule = false
3635
var objcHeaderOutput: String?
@@ -43,7 +42,7 @@ public class XCSwiftcFrontendMain {
4342
var diagnosticsPaths: [String] = []
4443
var sourceInfoPath: String?
4544
var docPath: String?
46-
45+
4746
for i in 0..<args.count {
4847
let arg = args[i]
4948
switch arg {

0 commit comments

Comments
 (0)