First-time binutils repository code-stare - indentation and contribution process
Maciej W. Rozycki
macro@mips.com
Wed Nov 15 14:14:00 GMT 2017
On Mon, 13 Nov 2017, Francois H. Theron wrote:
> I'm not going to touch any existing whitespace now. For new code I'd
> like to confirm one last thing: when indenting code to a deep level,
> is leading spaces acceptable or should every 8 spaces always be
> replaced with a hard tab char? I'm hoping that the 8 column tab is
> only for display purposes and that simple 2-space indentation with no
> hard tab chars is fine for new code. Many editors don't like this of
> course.
We do use tabs for leading multiples of 8 spaces, i.e. where indentation
nesting reaches such a number, followed by spaces for the remainder to
reach the column required.
I think it's not actually written down anywhere, nor at least I can find
where either the GNU Coding Standard:
<https://www.gnu.org/prep/standards/standards.html#Formatting> or the GDB
Coding Standard:
<https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards#Formatting_Your_Code>
-- which we generally follow, having no own copy -- explicitly mentions
the use of tabs for indentation. I believe this is what the `indent'
options quoted in the GNU Coding Standard do, as does Emacs, which is
where the rules have been set.
I can't comment on editorconfig, sorry.
Maciej
More information about the Binutils
mailing list