-
Notifications
You must be signed in to change notification settings - Fork 307
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
cue/fmt: Lists are indented too much #2314
Comments
FWIW, this is fine: import "list"
items: list.Concat([
a,
b
]) Looks like a problem with shorthand notation and depth calculation. The formatter should understand that just because it's of |
Thank you, this does look like a formatting bug. |
Looks like it's related to the length of the line. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa: list.Concat([
["a"],
["b"],
]) |
It seems to only trigger when the list is not the top-level value, i.e. this is fine: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa: [
["a"],
["b"],
] but these fail: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa: _ | [
["a"],
["b"],
]
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa: *[
["a"],
["b"],
] if the subsequent lines don't change indentation then it continues using the incorrect indentation for them: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa: *[
["a"],
["b"],
] |
Vertical tabs are not inserted when the next expression needs a form feed, but are erroneously inserted for expressions which hide the underlying type. This is fixed by recursively checking if expressions need a form feed. Fixes: cue-lang#2314 Signed-off-by: Thomas Way <[email protected]>
Vertical tabs are not inserted when the next expression needs a form feed, but are erroneously inserted for expressions which hide the underlying type. This is fixed by recursively checking if expressions need a form feed. Fixes: cue-lang#2314 Signed-off-by: Thomas Way <[email protected]>
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest stable release?
Yes.
What did you do?
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: