[PATCH v2] Add .clang-format
Alan Modra
amodra@gmail.com
Thu Oct 2 08:08:23 GMT 2025
On Wed, Oct 01, 2025 at 02:47:30PM -0400, Simon Marchi wrote:
> On 10/1/25 9:11 AM, Tom Tromey wrote:
> >>>> Are you ok with having this file at the top-level? Just adding this
> >>>> file shouldn't alter anybody's workflow.
> >
> >>> Until I see formatting instructions; either a config like
> >>> .clang-format or something a human can follow, I do not expect to
> >>> continue with this patch submission.
> >
> >>> So, yes please, I vote for a .clang-format file at the top level.
> >
> > Simon> I would also vote for merging it. The chances of this file breaking
> > Simon> anything are very low.
> >
> > I wasn't sure about putting it at the top level because I had two
> > concerns:
> >
> > 1. That some binutils users would think it was definitive for binutils
> > and use it, maybe causing some friction. (And I think this current
> > thread shows that at least the first clause of that seems plausible.)
>
> I think it needs to be clear in the header of the file that this is a
> best effort approximation meant to help, but its output should not be
> blindly trusted.
>
> > 2. That at some point we'd find a case where gdb and binutils disagree
> > on some setting.
>
> You will say that my faith in humanity is too high, but I can't imagine
> having a disagreement big enough between binutils and gdb that we need
> to have different automated formatting rules.
>
> > That said, I don't really care all that much where the file ends up.
> > How about we give the binutils maintainers a little more time; in the
> > absence of a response I'll send a new patch to put it in the root
> > directory.
I have no objection to the file going in at top level.
--
Alan Modra
More information about the Binutils
mailing list