Automating formatting for official D repos
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Mon Jan 22 16:24:48 UTC 2024
On 23/01/2024 4:14 AM, Prajwal S N wrote:
> I came across this suggestion from Rikki in one of the other threads,
> and just wanna make sure I understand correctly - we'd ideally want a CI
> job that runs dfmt on the PR, and in case of any reformatting, it pushes
> a commit with those changes. Or are we just looking for a job that
> detects if there is something that's not formatted correctly? (I think
> we already have this? Not sure)
Yes, we would commit the formatted code straight back.
What we have now with the primitive formatting check is it creates
opportunity for the PR to fail the CI.
With an automatic formatting tool, we can simply fix the code and move
on with our lives. No nitpicking, no asking how do I fix this error,
just ready to merge code!
More information about the Digitalmars-d
mailing list