Re: automated coding style tool

Simon Marchi via Gdb
2025-01-14T17:24:33Z

On 2025-01-14 12:14, Luis Machado wrote:
> I'd go for a tool, even if it is slightly to moderately different from what
> we tend to use. It's not like the GNU style has been updated to cope with
> the more recent C++ syntax, so we have some stuff that isn't properly
> documented.

I agree.

The style has to be precisely defined if everybody needs to do
formatting by hand, and we want the result to be consistent. But with
the tool, you say "the style is whatever the tool outputs", and that
clears sooo much mental space. I don't see the absolute need for the
auto-formatted code to follow to the letter whatever style we apply by
hand today.

If we don't like what the tool outputs, we can argue over than and
change the tool.

Also, if are missing some features to get the output we want, nobody is
going to magically implement them for us. And if we don't use the tool,
there's no motivation for us either to go implement the changes. I
think that the only way to get the ball rolling is to start using the
tool, even if the output is not ideal, and then if there's something
really annoying, one of us *might* have the motivation to go improve the
tool.

Simon