This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: First-time binutils repository code-stare - indentation and contribution process
- From: "Maciej W. Rozycki" <macro at mips dot com>
- To: "Francois H. Theron" <francois dot theron at netronome dot com>
- Cc: Nick Clifton <nickc at redhat dot com>, <binutils at sourceware dot org>
- Date: Wed, 15 Nov 2017 14:14:03 +0000
- Subject: Re: First-time binutils repository code-stare - indentation and contribution process
- Authentication-results: sourceware.org; auth=none
- References: <CACv6nk=wbtgFL8AhMYgjSWRyg-geMLeD+6wz3On-UzF__FH=3w@mail.gmail.com> <07c3d7e7-11e0-b0c2-641f-943ca7a2d3db@redhat.com> <alpine.DEB.2.00.1711131040220.3893@tp.orcam.me.uk> <CACv6nkmqEi72BeUd2sPYmmuL-TcB=dYaiBpCxLoR8-0dzeRmqw@mail.gmail.com>
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