From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by dpdk.org (Postfix) with ESMTP id CE579ADA7 for ; Tue, 2 Jun 2015 15:00:14 +0200 (CEST) Received: by wifw1 with SMTP id w1so143745073wif.0 for ; Tue, 02 Jun 2015 06:00:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=XDIOQCKhUrv+DmksOqIMb/IhbFr/oeuwR9LbXkgfgm8=; b=cS2byYB+QCTwWb59ploJEJ825X7ZyEmin9N8ywX3yp7y152fi/SQvgMElQPss130vw AR1KrNGWKsZ33e820ir8Nx431oOlf6E32QtlY7hkgMrG2GPqD0PbLZ3Iwc+VH7qjAioR Rjj1/gfb0CJ37w3t1Ecs+XpRTnqXo1bIutuLsXFl0p2rKMMXivVqZ/jhfA+QIvgJ0rNt VYMXp1lNbPnUWzSyaLuxa8BP4TYILIW2axALjeW9i4OiAImjsn2kmpMaMgyYV0ZkRQW1 tZruY+qqQpDraxCGz6dlB3+Tpeh68eZlIlsh/JiJlt2g3g1g3TeUfJJxKn8uHZ20lf33 WPQQ== X-Gm-Message-State: ALoCoQkvZVQ3NIRDxAQJFyiMb1W8IjB7JKCwETS15qHpXVOx5AESNxNF0ywVjhPCNg3nYlJuw/LF X-Received: by 10.180.206.211 with SMTP id lq19mr66791wic.81.1433250014214; Tue, 02 Jun 2015 06:00:14 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id ny7sm21525604wic.11.2015.06.02.06.00.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jun 2015 06:00:13 -0700 (PDT) From: Thomas Monjalon To: Bruce Richardson Date: Tue, 02 Jun 2015 14:59:24 +0200 Message-ID: <3429374.q3aYeV0bsN@xps13> Organization: 6WIND User-Agent: KMail/4.14.8 (Linux/4.0.4-2-ARCH; KDE/4.14.8; x86_64; ; ) In-Reply-To: <1431531022-29697-2-git-send-email-bruce.richardson@intel.com> References: <1431531022-29697-1-git-send-email-bruce.richardson@intel.com> <1431531022-29697-2-git-send-email-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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: Tue, 02 Jun 2015 13:00:15 -0000 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 ;) > 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 ;)