Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function calls format #366

Open
trozware opened this issue Jul 17, 2023 · 0 comments
Open

Function calls format #366

trozware opened this issue Jul 17, 2023 · 0 comments

Comments

@trozware
Copy link

The current style guide states that when a function call is wrapped on to multiple lines, the closing parenthesis should be on the same line as the last parameter, like this:

let id = getPersonID(
  name: "Bob",
  age: 42,
  registered: true,
  note: "Bob is not a real person.")

Xcode 15 has a new Refactor > Format to Multiple Lines option and it places the closing bracket on a line of its own, as shown here:

let id = getPersonID(
  name: "Bob",
  age: 42,
  registered: true,
  note: "Bob is not a real person."
)

I recommend changing the Kodeco style to match what Xcode produces.

Note that Xcode multi-lines function definitions in exactly the way the current style guide uses. It is only the function call style that it changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant