Skip to content

Submodules in one file should be indented according to BlueStyle #484

@oxinabox

Description

@oxinabox

From: https://github.com/invenia/BlueStyle#modules

Sometimes, e.g. for tests, or for namespacing a enumeration, it is desirable to declare a submodule midway through a file.
In this case the code within the submodule should be indented.

Consider the following code:

module Foo
module Bar
    x = 2
    y = 4
end

z = 5

end

It is correctly formatted by BlueStyle.

But after I run JuliaFormatter it ends up wrong:

julia> format_text(str, BlueStyle()) |> println
module Foo
module Bar
x = 2
y = 4
end

z = 5
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions