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

Enum cases has wrong indent in Array #218

Open
akuzminskyi opened this issue Mar 9, 2020 · 0 comments
Open

Enum cases has wrong indent in Array #218

akuzminskyi opened this issue Mar 9, 2020 · 0 comments

Comments

@akuzminskyi
Copy link

I'm using 2 spaces indention in Xcode and when I have array of enum cases Swimat format it with 4 spaces if I'm using a short form .one, but if I'm using a full form with the type(MyEnum.one) it uses again 2 spaces.

I think it always should be as 2 spaces(or based on Xcode preferences values).

enum MyEnum {
  case one
  case two
}

func test(array: [MyEnum]) { }


test(
  array: [
      .one,  // 4 spaces indent
      .two  // 4 spaces indent
  ]
)

test(
  array: [
    MyEnum.one, // 2 spaces indent
    MyEnum.two  // 2 spaces indent
  ]
)
@akuzminskyi akuzminskyi changed the title Enum cases wrong indent in Array Enum cases has wrong indent in Array Mar 9, 2020
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