From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] doc: add coding standards documentation
Date: Tue, 02 Jun 2015 14:59:24 +0200 [thread overview]
Message-ID: <3429374.q3aYeV0bsN@xps13> (raw)
In-Reply-To: <1431531022-29697-2-git-send-email-bruce.richardson@intel.com>
2015-05-13 16:30, Bruce Richardson:
> Add coding standards document to guides directory. This document
> codifies the current DPDK C coding conventions, to make it easier for
> contributors to see the format their code should be in.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Signed-off-by: Siobhan Butler <siobhan.a.butler@intel.com>
Thanks for your work.
It would be nice to apply this doc baseline shortly in order to be able to
update it, one change at a time.
> new file mode 100755
wrong file mode
non-Linux filesystem spotted ;)
> index 0000000..b2e522e
> --- /dev/null
> +++ b/doc/guides/coding_standards/index.rst
> @@ -0,0 +1,806 @@
> +Coding Style
> +=============
> +
> +Description
> +-----------
> +
> +This document specifies the preferred style for source files in the DPDK source tree. It is based on the Linux Kernel coding guidelines and the FreeBSD 7.2 Kernel Developer's Manual (see man style(9)), but was heavily modified for the needs of the DPDK.
> +
> +General Guidelines
> +------------------
> +
> +The rules and guidelines given in this document cannot cover every situation, so the following general guidelines should be used as a fallback:
> +
> +* The code style should be consistent within each individual file.
> +* In the case of creating new files, the style should be consistent within each file in a given directory or module.
> +* The primary reason for coding standards is to increase code readability and comprehensibility, therefore always use whatever option will make the code easiest to read.
> +
> +Line length is recommended to be not more than 80 characters, including comments. [Tab stop size should be assumed to be 8-characters wide].
Don't you think we should wrap lines a little to make future changes easier to review?
In general, there is no reason to put more than 1 idea or sentence on 1 line.
Don't forget that carriage return are ignored when rst docs are built.
> --- a/doc/guides/index.rst
> +++ b/doc/guides/index.rst
> @@ -45,3 +45,5 @@ Contents:
> sample_app_ug/index
> testpmd_app_ug/index
> rel_notes/index
> + coding_standards/index
> +
1 byte to save ;)
next prev parent reply other threads:[~2015-06-02 13:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-13 15:30 [dpdk-dev] [PATCH] Coding standards Bruce Richardson
2015-05-13 15:30 ` [dpdk-dev] [PATCH] doc: add coding standards documentation Bruce Richardson
2015-06-02 12:59 ` Thomas Monjalon [this message]
2015-06-03 10:43 ` Bruce Richardson
2015-06-03 13:58 ` [dpdk-dev] [PATCH v2] " Bruce Richardson
2015-06-03 17:35 ` Thomas Monjalon
2015-06-04 9:33 ` Bruce Richardson
2015-06-04 9:49 ` Thomas Monjalon
2015-06-04 13:36 ` Bruce Richardson
2015-05-19 11:23 ` [dpdk-dev] [PATCH] Coding standards Mcnamara, John
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=3429374.q3aYeV0bsN@xps13 \
--to=thomas.monjalon@6wind.com \
--cc=bruce.richardson@intel.com \
--cc=dev@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).