From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 87EC45A58 for ; Wed, 3 Jun 2015 12:43:22 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 03 Jun 2015 03:43:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,546,1427785200"; d="scan'208";a="719948687" Received: from bricha3-mobl3.ger.corp.intel.com ([10.243.20.22]) by fmsmga001.fm.intel.com with SMTP; 03 Jun 2015 03:43:19 -0700 Received: by (sSMTP sendmail emulation); Wed, 03 Jun 2015 11:43:19 +0025 Date: Wed, 3 Jun 2015 11:43:18 +0100 From: Bruce Richardson To: Thomas Monjalon Message-ID: <20150603104318.GA12832@bricha3-MOBL3> References: <1431531022-29697-1-git-send-email-bruce.richardson@intel.com> <1431531022-29697-2-git-send-email-bruce.richardson@intel.com> <3429374.q3aYeV0bsN@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3429374.q3aYeV0bsN@xps13> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] doc: add coding standards documentation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2015 10:43:23 -0000 On Tue, Jun 02, 2015 at 02:59:24PM +0200, Thomas Monjalon wrote: > 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 > > Signed-off-by: Siobhan Butler > > 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 ;) > Ooops, my secret is out! :-) > > 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. > Ok, I'll have a quick scan through to see how I can improve things. I agree one sentence per line is best. > > --- 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 ;) > I'll fix that in the V2 /Bruce