From ab579b71a87a2546cda9e21aa89749606da2ff4c Mon Sep 17 00:00:00 2001 From: Nate Weaver Date: Tue, 7 Feb 2023 13:44:01 -0600 Subject: [PATCH] Clean up some code --- icumap2code/main.swift | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/icumap2code/main.swift b/icumap2code/main.swift index 221a9db..e7d31f4 100644 --- a/icumap2code/main.swift +++ b/icumap2code/main.swift @@ -9,9 +9,20 @@ import Foundation import ArgumentParser struct ICUMap2Code: ParsableCommand { - static let configuration = CommandConfiguration(commandName: "icumap2code", abstract: "Convert UTS#46 and joiner type map files to a compact binary format.", version: "1.0 (v10)") + static let configuration = CommandConfiguration( + commandName: "icumap2code", + abstract: "Convert UTS#46 and joiner type map files to a compact binary format.", + version: "1.0 (v10)" + ) - @Option(name: [.customLong("compress"), .short], help: ArgumentHelp("Output compression mode.", discussion: "Default is uncompressed. Supported values are 'lzfse', 'lz4', 'lzma', and 'zlib'.", valueName: "mode")) + @Option( + name: [.customLong("compress"), .short], + help: ArgumentHelp( + "Output compression mode.", + discussion: "Default is uncompressed. Supported values are 'lzfse', 'lz4', 'lzma', and 'zlib'.", + valueName: "mode" + ) + ) var compression: UTS46.CompressionAlgorithm = .none @Flag(name: .shortAndLong, help: "Verbose output (on STDERR).") @@ -25,7 +36,14 @@ struct ICUMap2Code: ParsableCommand { @Option(name: [.customLong("joiners"), .short], help: ArgumentHelp("Joiner type input file.", valueName: "file")) var joinersFile: String? - @Option(name: [.customLong("output"), .short], help: ArgumentHelp("The output file.", discussion: "If no file is specified, outputs to stdout.", valueName: "file")) + @Option( + name: [.customLong("output"), .short], + help: ArgumentHelp( + "The output file.", + discussion: "If no file is specified, outputs to stdout.", + valueName: "file" + ) + ) var outputFile: String? func run() throws {