This is the mail archive of the
mailing list for the GCC project.
Re: C++ coding style inconsistencies
- From: Jeff Law <law at redhat dot com>
- To: Mikhail Maltsev <maltsevm at gmail dot com>, gcc at gcc dot gnu dot org, rdsandiford at googlemail dot com
- Date: Mon, 29 Jun 2015 10:01:11 -0600
- Subject: Re: C++ coding style inconsistencies
- Authentication-results: sourceware.org; auth=none
- References: <87vbeblk0y dot fsf at googlemail dot com> <558CBB6B dot 6040809 at gmail dot com> <87oak17h64 dot fsf at googlemail dot com>
On 06/27/2015 01:18 AM, Richard Sandiford wrote:
commit-hooks are the solution to this class of problem, IMHO. Either by
rejecting code which violates the formatting standards or automagically
formatting it for us (via gnu-indent presumably).
Mikhail Maltsev <email@example.com> writes:
Perhaps one disappointing exception is mixed space/tabs indentation. It
is often inconsistent (i.e. some parts use space-only indentation).
Yeah. Been hitting that recently too.
I believe glibc (for example) is using commit hooks to reject commits
that violate certain formatting rules. No reason we couldn't do the same.
Not sure what granularity that hooks uses -- ie, does it flag
preexisting formatting nits or just new ones. Either way works. The
former is a bit more burdensome initially, but does get the code base
into shape WRT formatting stuff more quickly.