JuliaFormatter.jl
JuliaFormatter.jl copied to clipboard
JuliaFormatter Incorrectly deleting indents?
Hi,
I'm using JuliaFormatter [98e50ef6] on Windows via VSCode, but have been constantly running into issues where it is seemingly deleting indents where it shouldn't, e.g. if I have test.jl with simply
[TAB][TAB][TAB][TAB][TAB]"a"
and then run format("test.jl") this turns into
"a"
which seems like a bug. JuliaFormatter.toml has only indent = 2. Any help or clarifications greatly appreciated, if any extra info needed please let me know.
if you have a file like this
"a"
to will align the "a" to the indent level which if there are no block scopes would be the lefthand side of the file
"a"
Sorry, my fault, I gave an incorrect example, it's more like the following:
this_is_some_random_code_expression_that_includes_a_long_string_over_multiple_lines == """
[TAB][TAB][TAB][TAB][TAB][TAB][TAB]this is the first part of some long string that is split over multiple lines
[TAB][TAB][TAB][TAB][TAB][TAB][TAB]this is the second part of some long string that is split over multiple lines"""
turning to
this_is_some_random_code_expression_that_includes_a_long_string_over_multiple_lines == """
this is the first part of some long string that is split over multiple lines
this is the second part of some long string that is split over multiple lines"""
On other machines JuliaFormatter does not seem to remove the tabs and GitHub JuliaFormatter expects the tabs to be there and CI throws due to incorrect formatting. But on my machine JuliaFormatter removes the tabs added by a JuliaFormatter on a different machine.