I took a pass over my SDDP.jl library (odow/SDDP.jl#256) and for the most part, it worked great! SDDP.jl should be a reasonably good test-case because it includes quite a few JuMP models with weird macro syntax.
Here's one of the things that came out of it:
s = """
function write_subproblem_to_file(
node::Node, filename::String;
format::Symbol=:both, throw_error::Bool = false)
end
"""
print(JuliaFormatter.format_text(s))
# output
function write_subproblem_to_file(
node::Node,
filename::String;
format::Symbol = :both, throw_error::Bool = false
) end
# expected
function write_subproblem_to_file(
node::Node,
filename::String;
format::Symbol = :both,
throw_error::Bool = false
) end
I took a pass over my SDDP.jl library (odow/SDDP.jl#256) and for the most part, it worked great! SDDP.jl should be a reasonably good test-case because it includes quite a few JuMP models with weird macro syntax.
Here's one of the things that came out of it: