Skip to content

Commit

Permalink
Rename closingparenfcall to callsiteparen
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklockwood committed Nov 18, 2023
1 parent d34578c commit 1f9121b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions Rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -2510,6 +2510,7 @@ Option | Description
`--wrapparameters` | Wrap func params: "before-first", "after-first", "preserve"
`--wrapcollections` | Wrap array/dict: "before-first", "after-first", "preserve"
`--closingparen` | Closing paren position: "balanced" (default) or "same-line"
`--callsiteparen` | Closing paren at call site: "inherit" (default) or "same-line"
`--wrapreturntype` | Wrap return type: "if-multiline", "preserve" (default)
`--wrapconditions` | Wrap conditions: "before-first", "after-first", "preserve"
`--wraptypealiases` | Wrap typealiases: "before-first", "after-first", "preserve"
Expand Down
6 changes: 3 additions & 3 deletions Sources/OptionDescriptor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -511,11 +511,11 @@ struct _Descriptors {
falseValues: ["balanced"]
)
let forceClosingParenOnSameLineForFunctionCalls = OptionDescriptor(
argumentName: "closingparenfcall",
argumentName: "callsiteparen",
displayName: "Force Closing Paren on same line for function calls",
help: "Force the closingParenOnSameLine option specifically for function calls: \"inherit\" (default) or \"force-same-line\"",
help: "Closing paren at call site: \"inherit\" (default) or \"same-line\"",
keyPath: \.forceClosingParenOnSameLineForFunctionCalls,
trueValues: ["force-same-line", "same-line"],
trueValues: ["same-line"],
falseValues: ["inherit"]
)
let uppercaseHex = OptionDescriptor(
Expand Down
10 changes: 5 additions & 5 deletions Sources/Rules.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3780,8 +3780,9 @@ public struct _FormatRules {
public let wrap = FormatRule(
help: "Wrap lines that exceed the specified maximum width.",
options: ["maxwidth", "nowrapoperators", "assetliterals", "wrapternary"],
sharedOptions: ["wraparguments", "wrapparameters", "wrapcollections", "closingparen", "indent",
"trimwhitespace", "linebreaks", "tabwidth", "maxwidth", "smarttabs", "wrapreturntype", "wrapconditions", "wraptypealiases", "wrapternary", "wrapeffects", "conditionswrap"]
sharedOptions: ["wraparguments", "wrapparameters", "wrapcollections", "closingparen", "callsiteparen", "indent",
"trimwhitespace", "linebreaks", "tabwidth", "maxwidth", "smarttabs", "wrapreturntype",
"wrapconditions", "wraptypealiases", "wrapternary", "wrapeffects", "conditionswrap"]
) { formatter in
let maxWidth = formatter.options.maxWidth
guard maxWidth > 0 else { return }
Expand Down Expand Up @@ -3837,9 +3838,8 @@ public struct _FormatRules {
public let wrapArguments = FormatRule(
help: "Align wrapped function arguments or collection elements.",
orderAfter: ["wrap"],
options: ["wraparguments", "wrapparameters", "wrapcollections", "closingparen",
"wrapreturntype", "wrapconditions", "wraptypealiases", "wrapeffects",
"conditionswrap"],
options: ["wraparguments", "wrapparameters", "wrapcollections", "closingparen", "callsiteparen",
"wrapreturntype", "wrapconditions", "wraptypealiases", "wrapeffects", "conditionswrap"],
sharedOptions: ["indent", "trimwhitespace", "linebreaks",
"tabwidth", "maxwidth", "smarttabs", "assetliterals", "wrapternary"]
) { formatter in
Expand Down
3 changes: 2 additions & 1 deletion Tests/MetadataTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ class MetadataTests: XCTestCase {
case .identifier("wrapCollectionsAndArguments"):
referencedOptions += [
Descriptors.wrapArguments, Descriptors.wrapParameters, Descriptors.wrapCollections,
Descriptors.closingParenOnSameLine, Descriptors.linebreak, Descriptors.truncateBlankLines,
Descriptors.closingParenOnSameLine, Descriptors.forceClosingParenOnSameLineForFunctionCalls,
Descriptors.linebreak, Descriptors.truncateBlankLines,
Descriptors.indent, Descriptors.tabWidth, Descriptors.smartTabs, Descriptors.maxWidth,
Descriptors.assetLiteralWidth, Descriptors.wrapReturnType, Descriptors.wrapEffects,
Descriptors.wrapConditions, Descriptors.wrapTypealiases, Descriptors.wrapTernaryOperators, Descriptors.conditionsWrap,
Expand Down

0 comments on commit 1f9121b

Please sign in to comment.