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 5:39 p.m., David Blaikie wrote:
> 
> 
> On Mon, Mar 8, 2021 at 2:31 PM Simon Marchi <[email protected] <mailto:[email protected]>> wrote:
> 
>     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 :).
> 
> 
> I think if you can point to a widely used style (the gdb (& binutils more generally?) codebase) there's probably going to be a fair bit of sympathy/understanding there. 

Ok, I will.  Worst case, the idea is shot down.

I filed a first one here:

https://bugs.llvm.org/show_bug.cgi?id=49481

Simon
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.