geodynamics / aspect

A parallel, extensible finite element code to simulate convection in both 2D and 3D models.
https://aspect.geodynamics.org/
Other
223 stars 234 forks source link

indent .prm files #2279

Open tjhei opened 6 years ago

tjhei commented 6 years ago

I think it would be useful to correctly indent .prm files. Of course c++ formatters like astyle won't work.

bangerth commented 6 years ago

I would suspect that we habitually do this, don't we? Have examples where we don't?

tjhei commented 6 years ago

One example: https://github.com/geodynamics/aspect/blob/e51a48f0875606300c22bcce3f8490a6401097a6/benchmarks/buiter_et_al_2008_jgr/figure_6_1e20.prm#L103

tjhei commented 6 years ago

but yes, most files look correctly indented.

ljhwang commented 6 years ago

I will review all files if someone gives me an example(s) to work from.

bangerth commented 6 years ago

@tjhei has an example in a previous comment above.

ljhwang commented 6 years ago

Well turns out what Timo had in mind was someone writing in perl an "astyle" for .prms which I would not necessary mark as a starter project. Perhaps I should just fix the line indicated and someone open a new issue?

bangerth commented 6 years ago

I think changing individual files is fine. We don't have many that don't conform to the common style. Whatever script we can come up with is not likely going to find too many things, and it may not be worth anyone's time to write such a script. So go ahead and fix whatever you can find, @ljhwang !