Re: automated coding style tool

Tom Tromey <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
>>>>> "Luis" == Luis Machado <[email protected]> writes:

>> I'm in favor of using a tool but my view is that it has to meet some
>> minimal standard of usefulness.  I just think clang-format does not do
>> this.

Luis> That's fair. But are we factoring in the amount of time spent over the years
Luis> telling contributors "you forgot a space here", "two spaces after period"?

Yes, of course I did.

I review a lot of patches.  My feeling is that formatting is
occasionally an issue, particularly with newcomers, but not really a big
part of review.  Bad formatting can be a signal that a patch requires
more attention, because experienced developers try to make their changes
conform to the style of the surrounding code -- so discrepancies mean
you may be dealing with someone who isn't so adept.

On the other hand, I also read a lot of code.  And, my view overall is
that readability is far more important than ease of formatting.  And,
furthermore, I dislike some aspects of clang-format's output, on
readability grounds.

Luis> Some stuff is a bit different and some other stuff is very different. But
Luis> personally I'm willing to see this automation go through and I'm fine
Luis> adapting to a potentially new format, whatever that is.

Me too, but within some bounds.

Luis> I might've mentioned this already, but for folks that deal with
Luis> multiple projects,

FWIW I also deal with multiple projects.

Tom
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.