File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Expand file tree Collapse file tree 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
1414
1515/// Collects the command line options that were passed to `swift-format` and dispatches to the
1616/// appropriate subcommand.
17+ @main
1718struct SwiftFormatCommand : ParsableCommand {
1819 static var configuration = CommandConfiguration (
1920 commandName: " swift-format " ,
@@ -29,5 +30,3 @@ struct SwiftFormatCommand: ParsableCommand {
2930 @OptionGroup ( )
3031 var versionOptions : VersionOptions
3132}
32-
33- SwiftFormatCommand . main ( )
Original file line number Diff line number Diff line change @@ -19,8 +19,7 @@ struct VersionOptions: ParsableArguments {
1919
2020 func validate( ) throws {
2121 if version {
22- // TODO: Automate updates to this somehow.
23- print ( " 508.0.0 " )
22+ printVersionInformation ( )
2423 throw ExitCode . success
2524 }
2625 }
You can’t perform that action at this time.
0 commit comments