diff --git a/Sources/Options.swift b/Sources/Options.swift index f3bf5eee1..4034824c0 100644 --- a/Sources/Options.swift +++ b/Sources/Options.swift @@ -208,7 +208,7 @@ public enum ReplacementKey: String, CaseIterable { } /// Argument type for stripping -public enum HeaderStrippingMode: Equatable, RawRepresentable, ExpressibleByStringLiteral { +public enum FileHeaderMode: Equatable, RawRepresentable, ExpressibleByStringLiteral { case ignore case replace(String) @@ -583,7 +583,7 @@ public struct FormatOptions: CustomStringConvertible { public var insertBlankLines: Bool public var removeBlankLines: Bool public var allmanBraces: Bool - public var fileHeader: HeaderStrippingMode + public var fileHeader: FileHeaderMode public var ifdefIndent: IndentMode public var wrapArguments: WrapMode public var wrapParameters: WrapMode @@ -698,7 +698,7 @@ public struct FormatOptions: CustomStringConvertible { insertBlankLines: Bool = true, removeBlankLines: Bool = true, allmanBraces: Bool = false, - fileHeader: HeaderStrippingMode = .ignore, + fileHeader: FileHeaderMode = .ignore, ifdefIndent: IndentMode = .indent, wrapArguments: WrapMode = .preserve, wrapParameters: WrapMode = .default, diff --git a/Tests/OptionDescriptorTests.swift b/Tests/OptionDescriptorTests.swift index 86cd37728..cd8ea5ec5 100644 --- a/Tests/OptionDescriptorTests.swift +++ b/Tests/OptionDescriptorTests.swift @@ -179,13 +179,13 @@ class OptionDescriptorTests: XCTestCase { (input: "/*\n\n\n*/", isValid: true), (input: "\n\n\n", isValid: true), ] - let fromOptionExpectations: [OptionArgumentMapping] = [ + let fromOptionExpectations: [OptionArgumentMapping] = [ (optionValue: "", argumentValue: "strip"), (optionValue: "// Header", argumentValue: "// Header"), (optionValue: .ignore, argumentValue: "ignore"), (optionValue: "/*\n\n\n*/", argumentValue: "/*\\n\\n\\n*/"), ] - let fromArgumentExpectations: [OptionArgumentMapping] = [ + let fromArgumentExpectations: [OptionArgumentMapping] = [ (optionValue: "", argumentValue: "strip"), (optionValue: "// Header", argumentValue: "// Header"), (optionValue: .ignore, argumentValue: "ignore"),