This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++ coding style inconsistencies


On 06/27/2015 01:18 AM, Richard Sandiford wrote:
Mikhail Maltsev <maltsevm@gmail.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.
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).

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.

Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]