Open ahoppen opened 1 year ago
Tracked in Apple’s issue tracker as rdar://111032264
Hey there,
Just trying to wrap my head around the correct formatting for these test cases.
For the first one, we've got 2 spaces before the get
and 4 spaces hanging out before the return
. Kinda like this:
\u{0020}\u{0020}get {
\u{0020}\u{0020}\u{0020}\u{0020}return 1
\u{0020}\u{0020}}
Given that we're using BasicFormat(indentationWidth: .spaces(4))
, I am assuming that the correctly formatted version would look something like this:
get {
\u{0020}\u{0020}\u{0020}\u{0020}return 1
}
Is my understanding correct? If not, could you please specify what the expected output should be in this case?
Oh, I should have been clearer in the issue: In both of theses cases, I think BasicFormat should just pick up the user-defined indentation and thus BasicFormat shouldn’t change the indentation.
In the following two cases, we appear to add too much indentation in front of the
return
.