JuliaFormatter.jl
JuliaFormatter.jl copied to clipboard
Comments should not be moved across parentheses
Code like
combine(x, 3 #= this is the magic number =#)
should probably not be reformatted to
combine(x, 3) #= this is the magic number =#
because the comment may refer to the function argument specifically.
In general, comments should typically not be moved as much because they are more likely to be intentionally placed with readability and formatting in mind.
Originally reported by @oscardssmith in https://github.com/SciML/DiffEqBase.jl/pull/1008#discussion_r1491504423