Skip to content

Avoid [x;;] notation in formatted code #422

Description

@odunbar

Issue

It appears that the following fails the julia-formatter .dev/climaformat.jl

x = 3.0
one_by_one_mat = [x;;]

Instead, julia formatter will convert this to

x = 3.0
one_by_one_mat = [x] # <- no longer a matrix!

Which breaks tests.

Temporary solution

As this seems to be a funk in the JuliaFormatter package rather than the wrapper, I'd advise replacing it with

x = 3.0
one_by_one_mat = fill(x,1,1)

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