DPDK usage discussions
 help / color / mirror / Atom feed
From: "Gaëtan Rivet" <gaetan.rivet@6wind.com>
To: Sam <batmanustc@gmail.com>
Cc: users@dpdk.org
Subject: Re: [dpdk-users] Why not extand tab into space in dpdk's coding style?
Date: Fri, 9 Jun 2017 12:15:26 +0200	[thread overview]
Message-ID: <20170609101526.GF29091@bidouze.vm.6wind.com> (raw)
In-Reply-To: <CAOE=1Z1xR5mKrotbNSJM6s-eAZb+f9=kbkeL=NEEzjrthmxyfg@mail.gmail.com>

Hi Sam,

On Fri, Jun 09, 2017 at 06:03:07PM +0800, Sam wrote:
> Now coding in dpdk, I find that lots of file use TABs and SPACEs together
> for indentation, mixed !!!
> 
> I don't know if this is due to some one prefer SPACE, others prefer TAB.
> 
> For ovs, its coding style restrict to use TAB to extand SPACE, why dpdk
> don't like this?

The coding style for DPDK is explained in [1]. Indentation is explained
in [2]. It is pretty close to LKCS.

For hard tabs / space mixes, usually this is the result of the proper
indentation not being modulo 8, the length of the tab. In this case, you
have to indent as much as possible with hard tabs and complete with
spaces.

There may be errors in coding style as it has not always been strictly
enforced, and some maintainers are less stringent on this, but the
choice has been made a long time ago and it is for using tabs.

[1]: http://dpdk.org/doc/guides/contributing/coding_style.html
[2]: http://dpdk.org/doc/guides/contributing/coding_style.html#c-indentation

Cheers,
-- 
Gaëtan Rivet
6WIND

           reply	other threads:[~2017-06-09 10:15 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <CAOE=1Z1xR5mKrotbNSJM6s-eAZb+f9=kbkeL=NEEzjrthmxyfg@mail.gmail.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170609101526.GF29091@bidouze.vm.6wind.com \
    --to=gaetan.rivet@6wind.com \
    --cc=batmanustc@gmail.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).