We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
before formatting is appplied:
public enum TestEnum: Int { case a = 0, b = 1, c = 2 }
with OneCasePerLine formatting:
public enum TestEnum: Int { case a = 0 case b = 1 case c = 2 }
The correct format should be:
The text was updated successfully, but these errors were encountered:
Presumably this is because we're keeping the leading newline trivia on the case's names. That's easy enough to remove.
It needs to be done with care though, since we'd also need to handle the following situations:
public enum TestEnum { case a, // line comment b, /* block comment */ c }
The desired outcome for the line comment case is probably straightforward—move the trivia to the front of the injected case keyword:
case
// line comment case b
For block comments, there's a bit more flexibility:
/* block comment */ case c ??? case /* block comment */ c ???
The first one is probably fine, and would at least be consistent with the line comment case.
Sorry, something went wrong.
No branches or pull requests
before formatting is appplied:
with OneCasePerLine formatting:
The correct format should be:
The text was updated successfully, but these errors were encountered: