Skip to content

Commit f14e2a6

Browse files
Fix formatting of ./SourceKitLSPDevUtils
1 parent 571f397 commit f14e2a6

File tree

4 files changed

+40
-36
lines changed

4 files changed

+40
-36
lines changed

SourceKitLSPDevUtils/Package.swift

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,26 @@ let package = Package(
66
name: "SourceKitLSPDevUtils",
77
platforms: [.macOS(.v10_15)],
88
products: [
9-
.executable(name: "sourcekit-lsp-dev-utils", targets: ["SourceKitLSPDevUtils"]),
9+
.executable(name: "sourcekit-lsp-dev-utils", targets: ["SourceKitLSPDevUtils"])
1010
],
1111
dependencies: [
1212
.package(url: "https://github.com/swiftlang/swift-syntax.git", from: "600.0.1"),
1313
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.5.0"),
1414
],
1515
targets: [
16-
.executableTarget(name: "SourceKitLSPDevUtils", dependencies: [
17-
"ConfigSchemaGen",
18-
.product(name: "ArgumentParser", package: "swift-argument-parser"),
19-
]),
16+
.executableTarget(
17+
name: "SourceKitLSPDevUtils",
18+
dependencies: [
19+
"ConfigSchemaGen",
20+
.product(name: "ArgumentParser", package: "swift-argument-parser"),
21+
]
22+
),
2023
.target(
2124
name: "ConfigSchemaGen",
2225
dependencies: [
2326
.product(name: "SwiftSyntax", package: "swift-syntax"),
2427
.product(name: "SwiftParser", package: "swift-syntax"),
2528
]
26-
)
29+
),
2730
]
2831
)

SourceKitLSPDevUtils/Sources/SourceKitLSPDevUtils/Commands/GenerateConfigSchema.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ import ArgumentParser
1414
import ConfigSchemaGen
1515

1616
struct GenerateConfigSchema: ParsableCommand {
17-
static let configuration = CommandConfiguration(
18-
abstract: "Generate a JSON schema and documentation for the SourceKit-LSP configuration file"
19-
)
17+
static let configuration = CommandConfiguration(
18+
abstract: "Generate a JSON schema and documentation for the SourceKit-LSP configuration file"
19+
)
2020

21-
func run() throws {
22-
try ConfigSchemaGen.generate()
23-
}
21+
func run() throws {
22+
try ConfigSchemaGen.generate()
23+
}
2424
}

SourceKitLSPDevUtils/Sources/SourceKitLSPDevUtils/Commands/VerifyConfigSchema.swift

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,23 @@ import ConfigSchemaGen
1515
import Foundation
1616

1717
struct VerifyConfigSchema: ParsableCommand {
18-
static let configuration = CommandConfiguration(
19-
abstract: "Verify that the generated JSON schema and documentation for the SourceKit-LSP configuration file are up-to-date"
20-
)
18+
static let configuration = CommandConfiguration(
19+
abstract:
20+
"Verify that the generated JSON schema and documentation for the SourceKit-LSP configuration file are up-to-date"
21+
)
2122

22-
func run() throws {
23-
let plans = try ConfigSchemaGen.plan()
24-
for plan in plans {
25-
print("Verifying \(plan.category) at \"\(plan.path.path)\"")
26-
let expectedContents = try plan.contents()
27-
let actualContents = try Data(contentsOf: plan.path)
28-
guard expectedContents == actualContents else {
29-
print("FATAL: \(plan.category) is out-of-date!")
30-
print("Please run `./sourcekit-lsp-dev-utils generate-config-schema` to update it.")
31-
throw ExitCode.failure
32-
}
33-
}
34-
print("All schemas are up-to-date!")
23+
func run() throws {
24+
let plans = try ConfigSchemaGen.plan()
25+
for plan in plans {
26+
print("Verifying \(plan.category) at \"\(plan.path.path)\"")
27+
let expectedContents = try plan.contents()
28+
let actualContents = try Data(contentsOf: plan.path)
29+
guard expectedContents == actualContents else {
30+
print("FATAL: \(plan.category) is out-of-date!")
31+
print("Please run `./sourcekit-lsp-dev-utils generate-config-schema` to update it.")
32+
throw ExitCode.failure
33+
}
3534
}
35+
print("All schemas are up-to-date!")
36+
}
3637
}

SourceKitLSPDevUtils/Sources/SourceKitLSPDevUtils/SourceKitLSPDevUtils.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ import ArgumentParser
1414

1515
@main
1616
struct SourceKitLSPDevUtils: ParsableCommand {
17-
static let configuration = CommandConfiguration(
18-
commandName: "sourcekit-lsp-dev-utils",
19-
abstract: "Utilities for developing SourceKit-LSP",
20-
subcommands: [
21-
GenerateConfigSchema.self,
22-
VerifyConfigSchema.self,
23-
]
24-
)
17+
static let configuration = CommandConfiguration(
18+
commandName: "sourcekit-lsp-dev-utils",
19+
abstract: "Utilities for developing SourceKit-LSP",
20+
subcommands: [
21+
GenerateConfigSchema.self,
22+
VerifyConfigSchema.self,
23+
]
24+
)
2525
}

0 commit comments

Comments
 (0)