MakieOrg / Makie.jl

Interactive data visualizations and plotting in Julia
https://docs.makie.org/stable
MIT License
2.4k stars 306 forks source link

Inconsistent formatting / code style #2519

Open t-bltg opened 1 year ago

t-bltg commented 1 year ago

Would you consider adding a JuliaFormatter action workflow and an initial format of the Makie repo ?

The code style across source file is inconsistent (not only from the margins pov, but also operator spacing, function one-liners, function declarations, indentation, ...).

I must admit this has bothered me for a while, and it is imo a bit of a pain to work with: it would help a lot if we had an initial format run, and added a format check action for PRs (not auto-format PRs, because they pollute the git history), together with a custom .JuliaFormatter.toml file.

It's not a matter of whatever style is chosen (we don't care which one would be chosen): being inconsistent is not only disruptive but can also lead to endless discussion and arguing about those.

The JuliaFormatter tool might not be perfect yet, but we get decent results these days.

SimonDanisch commented 1 year ago

Yeah, I planned to do that once upon a time, but at that point, JuliaFormatter was still erroring on the Makie repo, so I never went through with it... If JuliaFormatter is more mature now and runs without error, we could think about adding it :)

t-bltg commented 1 year ago

Thanks, I'll try to come up with something. Do you have a preferred style in mind ?

Regarding the bugs that might occur, I prefer to fix JuliaFormatter bugs and go on with this.

SimonDanisch commented 1 year ago

I already pushed a Juliafromatter.toml when I tried to add it to the repo: https://github.com/MakieOrg/Makie.jl/blob/master/.JuliaFormatter.toml

t-bltg commented 1 year ago

Ho, I missed that :sweat_smile:, thx.