File tree 3 files changed +18
-4
lines changed
3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // This source file is part of the Swift.org open source project
4
+ //
5
+ // Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
6
+ // Licensed under Apache License v2.0 with Runtime Library Exception
7
+ //
8
+ // See https://swift.org/LICENSE.txt for license information
9
+ // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10
+ //
11
+ //===----------------------------------------------------------------------===//
12
+
13
+ func printVersionInformation( ) {
14
+ // TODO: Automate updates to this somehow.
15
+ print ( " main " )
16
+ }
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import ArgumentParser
14
14
15
15
/// Collects the command line options that were passed to `swift-format` and dispatches to the
16
16
/// appropriate subcommand.
17
+ @main
17
18
struct SwiftFormatCommand : ParsableCommand {
18
19
static var configuration = CommandConfiguration (
19
20
commandName: " swift-format " ,
@@ -29,5 +30,3 @@ struct SwiftFormatCommand: ParsableCommand {
29
30
@OptionGroup ( )
30
31
var versionOptions : VersionOptions
31
32
}
32
-
33
- SwiftFormatCommand . main ( )
Original file line number Diff line number Diff line change @@ -19,8 +19,7 @@ struct VersionOptions: ParsableArguments {
19
19
20
20
func validate( ) throws {
21
21
if version {
22
- // TODO: Automate updates to this somehow.
23
- print ( " 508.0.0 " )
22
+ printVersionInformation ( )
24
23
throw ExitCode . success
25
24
}
26
25
}
You can’t perform that action at this time.
0 commit comments