Skip to content

Commit

Permalink
Rename HeaderStrippingMode to FileHeaderMode
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklockwood committed Jun 11, 2024
1 parent 765d335 commit 922a84f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Sources/Options.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions Tests/OptionDescriptorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,13 @@ class OptionDescriptorTests: XCTestCase {
(input: "/*\n\n\n*/", isValid: true),
(input: "\n\n\n", isValid: true),
]
let fromOptionExpectations: [OptionArgumentMapping<HeaderStrippingMode>] = [
let fromOptionExpectations: [OptionArgumentMapping<FileHeaderMode>] = [
(optionValue: "", argumentValue: "strip"),
(optionValue: "// Header", argumentValue: "// Header"),
(optionValue: .ignore, argumentValue: "ignore"),
(optionValue: "/*\n\n\n*/", argumentValue: "/*\\n\\n\\n*/"),
]
let fromArgumentExpectations: [OptionArgumentMapping<HeaderStrippingMode>] = [
let fromArgumentExpectations: [OptionArgumentMapping<FileHeaderMode>] = [
(optionValue: "", argumentValue: "strip"),
(optionValue: "// Header", argumentValue: "// Header"),
(optionValue: .ignore, argumentValue: "ignore"),
Expand Down

0 comments on commit 922a84f

Please sign in to comment.