From patchwork Fri May 13 15:55:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 67791 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp340192qge; Fri, 13 May 2016 08:56:07 -0700 (PDT) X-Received: by 10.140.144.204 with SMTP id 195mr16673744qhq.92.1463154967745; Fri, 13 May 2016 08:56:07 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id b2si12414719qka.220.2016.05.13.08.56.07; Fri, 13 May 2016 08:56:07 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 0B28A6165E; Fri, 13 May 2016 15:56:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 6B03E6157E; Fri, 13 May 2016 15:55:59 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id AB2B061650; Fri, 13 May 2016 15:55:57 +0000 (UTC) Received: from mail-qg0-f52.google.com (mail-qg0-f52.google.com [209.85.192.52]) by lists.linaro.org (Postfix) with ESMTPS id 8971061103 for ; Fri, 13 May 2016 15:55:56 +0000 (UTC) Received: by mail-qg0-f52.google.com with SMTP id w36so59834090qge.3 for ; Fri, 13 May 2016 08:55:56 -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; bh=hQxmEJGXJn9Mysli0ftgE144WA4impMaJdPjU/wC5t0=; b=jlwT94FGj/OlPXOyr3hIAR7EWe78lnXOAF0TkzNjoX0/cANfmvAw6glqDOEew9FHEZ WbX9u1UpO/k8IxC/H8ylUnGhKFMlvdTEQbBqBjfl8rCH/sTlzSGoqiHgkbxXjS2Mx8/H jr0CwOacbM+b22Hf5ssKQL/zeqb9H+Im61iROOTGVbAczA/BF9zYv9EzNwmQY9MUa8y6 7DyZo/tXUvE28e4oucSkgT4/a1NcYB+r0659P3df0MOjNXiefOBOu9C+oaMG0G3jjn0U rAC2sJov1YTZo4SxA96sTItWE+0rDrdgACPKSPx4/Tj4+4c2WGucpVbzEybOTH3NrnpV N7iw== X-Gm-Message-State: AOPr4FVpw7OhXVMgcm5goq9vFX96MX4al0/a4vdDQy3cN4RE8DwrtmGAsdylG6pBeSgsDvVDYKA= X-Received: by 10.140.40.99 with SMTP id w90mr15725565qgw.42.1463154956270; Fri, 13 May 2016 08:55:56 -0700 (PDT) Received: from localhost.localdomain (c-98-221-136-245.hsd1.nj.comcast.net. [98.221.136.245]) by smtp.gmail.com with ESMTPSA id k33sm8576711qge.27.2016.05.13.08.55.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 May 2016 08:55:55 -0700 (PDT) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Fri, 13 May 2016 11:55:38 -0400 Message-Id: <1463154938-17873-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.7.4 X-Topics: patch Subject: [lng-odp] [PATCH v2] doc: process-guide: convert CONTRIBUTING to asciidoc X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Converting to asciidoc allows a tidy page to be added to the online documentation without cutting and pasting into wordpress. Being Asccidoc a tiny amount of clutter is added to show code snippets attractively when rendered that make it slightly hard to read as a raw document. Signed-off-by: Mike Holmes --- v2 [source,] formatting, ":", improve section on .svg (Bill) CONTRIBUTING | 108 ++++++++++++++++++++++++++---------------- doc/process-guide/.gitignore | 1 + doc/process-guide/Makefile.am | 11 ++++- 3 files changed, 76 insertions(+), 44 deletions(-) diff --git a/CONTRIBUTING b/CONTRIBUTING index f2f8947..a4ed988 100644 --- a/CONTRIBUTING +++ b/CONTRIBUTING @@ -1,28 +1,32 @@ -Contributing to the OpenDataplane (ODP) API -------------------------------------------- - -Table of content: ------------------ -1. New Development -2. ODP patch expectations as an open source project -3. Common Errors in Patch and Commit Messages -4. Documenting the code -5. Documenting the user docs -6. References - -1. New Development ------------------- -ODP code shall be written with the kernel coding style [1]. +:doctitle: OpenDataPlane (ODP) CONTRIBUTING +:description: This document is intended to guide a new application developer + +in understanding the contributing requirements for ODP +:imagesdir: ../images +:toc: +:numbered!: +[abstract] + +== Abstract + +This document is intended to guide a new application developer in understanding +the contributing requirements for ODP + +== New Development + +ODP code shall be written with the kernel coding style https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/CodingStyle[Kernel Coding Style] + ODP code shall be documented using the doxygen style described in the "Documenting the code" section. Check patch script/checkpatch.pl shall be used before submitting a patch. -2. ODP patch expectations as an open source project ----------------------------------------------------- +== ODP patch expectations as an open source project + While specific to the Linux kernel development, the following reference could -also be considered a general guide for any Open Source development [2] and is -relevant to ODP. Many of the guidelines in this ODP document are related to the -items in that information. +also be considered a general guide for any Open Source development +http://ldn.linuxfoundation.org/book/how-participate-linux-community[Participating in the Community] +and is relevant to ODP. Many of the guidelines in this ODP document are related +to the items in that information. + Pay particular attention to section 5.3 that talks about patch preparation. The key thing to remember is to break up your changes into logical sections. Otherwise you run the risk of not being able to even explain the purpose of a @@ -34,11 +38,12 @@ Signed-off-by: tag line a copy of the description follows: Signed-off-by: this is a developer's certification that he or she has the right to submit the patch for inclusion into the [project]. It is an agreement to the Developer's Certificate of Origin, the full text of -which can be found in [3] Documentation/SubmittingPatches. +which can be found in https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches[Submitting Patches] + Code without a proper signoff cannot be merged into the mainline. -3. Common Errors in Patch and Commit Messages ---------------------------------------------- +== Common Errors in Patch and Commit Messages + - Avoid starting the summary line with a capital letter, unless the component being referred to also begins with a capital letter. - Don't have one huge patch, split your change into logical subparts. It's @@ -83,8 +88,8 @@ Code without a proper signoff cannot be merged into the mainline. sources. - Avoid punctuation in the short log. -4. Documenting the code ------------------------ +== Documenting the code + - Allow doxygen to use all its default behaviors to identify tagged information but where a doxygen tag must be specified use @ - The first line is by default the brief summary. @@ -93,49 +98,68 @@ Code without a proper signoff cannot be merged into the mainline. - Normal comment sections should be before the code block and start with /** on its own line and finish with */ on its own line. The exception to this rule is a case where the comment is very small, for example - /** macro description */ - #define SOME_MACRO 0 +[source,doxygen] +---- + /** macro description */ + #define SOME_MACRO 0 +---- - Commenting on the end of a line for macros and struct members is allowed - using: - /**< */ for example - #define SOME_MACRO 0 /**< */ + using: /**< */ for example +[source,doxygen] +---- + #define SOME_MACRO 0 /**< */ +---- - Files should start with a files description using @file - Functions should specify their parameters with @param[in] and @param[out] - Functions return values should all be specified using @return or @retval - There should be no doxygen warnings or errors generated. -5. Documenting the user docs ----------------------------- +== Documenting the user docs + - Users guides are stored in asciidoctor format in the odp/docs directory and in sub directories of it as appropriate. - ODP code references such as types and enums are highlighted using the - + syntax. For example text referring to the type odp_pktio_t would decorate the - type thus:- - +odp_pktio_t+ + ` syntax. For example text referring to the type odp_pktio_t would decorate the + type thus: +[source,asciidoc] +---- + `odp_pktio_t` +---- - Section heading use the = syntax. For example:- +[source,asciidoc] +---- == Level 1 Text. === Level 2 Text. +---- - Code and scripting excerpts are decorated with the block syntax:- +[source,asciidoc] +---- .Optional Title [source,perl] ---- ---- +---- - Images are decorated with :- +[source,asciidoc] +---- .Optional Title - image::../images/.svg[align="center"] -- The images are stored in the doc/images directory as svg files. + image::../.svg[align="center"] +---- +- The images are stored in the doc/images directory as svg files, src for image + generators such as .gv and .msg should also render to .svg - Body text shall wrap at the 80 char point. - No warnings may be generated by the asciidoctor tool. -6. References -------------- -[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/CodingStyle -[2] http://ldn.linuxfoundation.org/book/how-participate-linux-community -[3] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches + + + + + + diff --git a/doc/process-guide/.gitignore b/doc/process-guide/.gitignore index 7632500..3370e15 100644 --- a/doc/process-guide/.gitignore +++ b/doc/process-guide/.gitignore @@ -1,2 +1,3 @@ bylaws-guide.html release-guide.html +CONTRIBUTING.html diff --git a/doc/process-guide/Makefile.am b/doc/process-guide/Makefile.am index 196ed7f..1aba167 100644 --- a/doc/process-guide/Makefile.am +++ b/doc/process-guide/Makefile.am @@ -4,11 +4,13 @@ EXTRA_DIST = $(top_srcdir)/doc/process-guide/bylaws-guide.adoc \ $(top_srcdir)/doc/process-guide/release-guide.adoc all-local: bylaws-guide.html \ - release-guide.html + release-guide.html \ + CONTRIBUTING.html clean-local: rm -f $(builddir)/bylaws-guide.html rm -f $(builddir)/release-guide.html + rm -f $(builddir)/CONTRIBUTING.html release-guide.html: $(top_srcdir)/doc/process-guide/release-guide.adoc \ $(top_srcdir)/doc/images/simple_release_git.svg \ @@ -16,4 +18,9 @@ release-guide.html: $(top_srcdir)/doc/process-guide/release-guide.adoc \ bylaws-guide.html: $(top_srcdir)/doc/process-guide/bylaws-guide.adoc -doc_DATA = bylaws-guide.html release-guide.html +#special case is not postfixed .adoc +CONTRIBUTING.html: $(top_srcdir)/CONTRIBUTING + asciidoctor $(ASCIIDOC_FLAGS) --out-file=$@ $< + + +doc_DATA = bylaws-guide.html release-guide.html CONTRIBUTING.html