Re: GNU style checker for GDB
Simon Marchi via Gdb <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
On 2021-03-08 3:39 p.m., David Blaikie wrote:
> If anyone's interested in investing some time in it, I expect clang-format would be open to bugs/patches to support whatever formatting idioms gdb needs.
That's one of those things I'd really like to try, but will never have
time. But I can at least file some bugs.
What stopped me from doing so in the past is that the missing things
were really some things I would consider like oddities / inconsistency
of our style. For example, we use space before parenthesis, except for
the `_` (gettext) macro:
printf (_("Hello %s\n"), name);
If we tell clang-format we want spaces before function call parenthesis,
it (rightfully) inserts a space after the `_`. To prevent that, I
suppose we'd need a way to say: in general I want this style, but for
this macro I want this other style. I fear I'll be called crazy if I
request that :).
Simon