Skip to content

Collection entry indentation inconsistency in fmt  #299

Closed
@ahakanbaba

Description

@ahakanbaba

Consider the following indentations auto generated by jsonnet fmt

{
    collCorrect1: [{
        name: "Good",
    }],
    collCorrect2: [{
        name: "Bad",
    }, someOther(),
    ],
    collWeird: [{
                    name: "Bad",
                },
                someOther(),
    ],
}

It looks like the someOther() function being on a new line confuses the indentation calculation for the collWeird example.

Would you consider this as a bug @sparkprime ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions