File tree Expand file tree Collapse file tree 6 files changed +22
-32
lines changed
SwiftSyntaxDevUtils/Sources/swift-syntax-dev-utils Expand file tree Collapse file tree 6 files changed +22
-32
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import ArgumentParser
15
15
@main
16
16
struct SwiftSyntaxDevUtils : ParsableCommand {
17
17
18
- static var configuration : CommandConfiguration = CommandConfiguration (
18
+ static let configuration = CommandConfiguration (
19
19
abstract: """
20
20
Build and test script for SwiftSyntax.
21
21
Original file line number Diff line number Diff line change @@ -14,11 +14,9 @@ import ArgumentParser
14
14
import Foundation
15
15
16
16
struct Build : ParsableCommand , BuildCommand {
17
- static var configuration : CommandConfiguration {
18
- return CommandConfiguration (
19
- abstract: " Build swift-syntax. "
20
- )
21
- }
17
+ static let configuration = CommandConfiguration (
18
+ abstract: " Build swift-syntax. "
19
+ )
22
20
23
21
@OptionGroup
24
22
var arguments : BuildArguments
Original file line number Diff line number Diff line change @@ -24,17 +24,15 @@ fileprivate let directoriesToExclude = [
24
24
]
25
25
26
26
struct Format : ParsableCommand {
27
- static var configuration : CommandConfiguration {
28
- return CommandConfiguration (
29
- abstract: " Format files in SwiftSyntax using swift-format. " ,
30
- discussion: """
31
- This command automatically builds the ' \( Self . swiftFormatBranch) ' branch \
32
- of swift-format in the ' \( Paths . swiftFormatBuildDir. lastPathComponent) ' \
33
- directory of this repository and uses the build to format the swift-syntax \
34
- sources.
35
- """
36
- )
37
- }
27
+ static let configuration = CommandConfiguration (
28
+ abstract: " Format files in SwiftSyntax using swift-format. " ,
29
+ discussion: """
30
+ This command automatically builds the ' \( Self . swiftFormatBranch) ' branch \
31
+ of swift-format in the ' \( Paths . swiftFormatBuildDir. lastPathComponent) ' \
32
+ directory of this repository and uses the build to format the swift-syntax \
33
+ sources.
34
+ """
35
+ )
38
36
39
37
@Flag ( help: " Update the sources of swift-format and rebuild swift-format " )
40
38
var update : Bool = false
Original file line number Diff line number Diff line change @@ -14,11 +14,9 @@ import ArgumentParser
14
14
import Foundation
15
15
16
16
struct GenerateSourceCode : ParsableCommand , SourceCodeGeneratorCommand {
17
- static var configuration : CommandConfiguration {
18
- return CommandConfiguration (
19
- abstract: " Generate swift-syntax sources. "
20
- )
21
- }
17
+ static let configuration = CommandConfiguration (
18
+ abstract: " Generate swift-syntax sources. "
19
+ )
22
20
23
21
@OptionGroup
24
22
var arguments : SourceCodeGeneratorArguments
Original file line number Diff line number Diff line change @@ -14,11 +14,9 @@ import ArgumentParser
14
14
import Foundation
15
15
16
16
struct Test : ParsableCommand , BuildCommand {
17
- static var configuration : CommandConfiguration {
18
- return CommandConfiguration (
19
- abstract: " Run swift-syntax tests. "
20
- )
21
- }
17
+ static let configuration = CommandConfiguration (
18
+ abstract: " Run swift-syntax tests. "
19
+ )
22
20
23
21
@OptionGroup
24
22
var arguments : BuildArguments
Original file line number Diff line number Diff line change @@ -18,11 +18,9 @@ fileprivate var modules: [String] {
18
18
}
19
19
20
20
struct VerifySourceCode : ParsableCommand , SourceCodeGeneratorCommand {
21
- static var configuration : CommandConfiguration {
22
- return CommandConfiguration (
23
- abstract: " Verify that the generated sources match the ones checked into the repository. "
24
- )
25
- }
21
+ static let configuration = CommandConfiguration (
22
+ abstract: " Verify that the generated sources match the ones checked into the repository. "
23
+ )
26
24
27
25
@OptionGroup
28
26
var arguments : SourceCodeGeneratorArguments
You can’t perform that action at this time.
0 commit comments