Skip to content

Concatenation with if conditions could be indented better  #491

Open
@ahakanbaba

Description

@ahakanbaba

Consider to following output for jsonnet fmt --indent 4 --string-style l

local tcm = if (env.isDev) then [] else [] +
                                        if (env.isDev || env.isStaging) then [] else [] +
                                                                                     [
                                                                                         'app',
                                                                                     ];

local tcm2 = "a" + "b " +
             "c";

local tcm3 = ["a"] + ["b "] +
             ["c"];

{
}


Once if conditions are involved with concatenations, it looks like jsonnet fmt does not indent correctly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions