From patchwork Thu May 12 19:12:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 67697 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp916159qge; Thu, 12 May 2016 12:15:19 -0700 (PDT) X-Received: by 10.141.28.204 with SMTP id f195mr11913475qhe.59.1463080519459; Thu, 12 May 2016 12:15:19 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id o189si9443112qkc.240.2016.05.12.12.15.19; Thu, 12 May 2016 12:15:19 -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 24CD461651; Thu, 12 May 2016 19:15:19 +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_H3, RCVD_IN_MSPIKE_WL, 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 145DE61605; Thu, 12 May 2016 19:15:09 +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 15319615F7; Thu, 12 May 2016 19:14:56 +0000 (UTC) Received: from mail-qk0-f182.google.com (mail-qk0-f182.google.com [209.85.220.182]) by lists.linaro.org (Postfix) with ESMTPS id 991206165C for ; Thu, 12 May 2016 19:13:08 +0000 (UTC) Received: by mail-qk0-f182.google.com with SMTP id x7so48765488qkd.3 for ; Thu, 12 May 2016 12:13:08 -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=CZSVSW7QQimythPRRHW6COkibcFjGQ+rL5uTeXf+4BQ=; b=lNWPjsEgJC9mYGZoZYbPHNWxbKspoYdcGbhT3DosqXxs5cUMnonMysUhqwNlg8bYqC 3pkFgnABBLa2X1c0gpiONMxbQx/3bElr3fCMxjLRUQlUqfq1eNMBomYXlvibQzpyMu9b FDH+S8dlGwrle18YVIgumeaRjfB/iRfNeYxUmU0nTKdgK5zAUmRJ57iCwRyyH5Z4hIMp A1MvGXX++lOz+q4QyApResN4JIYDrV5Z9oiOwlmZXjJAOgbSchXtY0q13f2YF0kLrNON MSNShw2ap/voUnCPF8WelNbrRRLxZm4ozRCCRA8k87ASzSbkM2PXpVzEBkHA3KL4F2kY SkQw== X-Gm-Message-State: AOPr4FUH1zrQOCH33brWjZZ1lajzTjISDU8QyFTQNp0X8bNJ3NfHhBEtBZ4lONLNgO1IInDkQPA= X-Received: by 10.55.204.214 with SMTP id n83mr12248182qkl.154.1463080388294; Thu, 12 May 2016 12:13:08 -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 g19sm6658417qgd.49.2016.05.12.12.13.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 May 2016 12:13:07 -0700 (PDT) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Thu, 12 May 2016 15:12:44 -0400 Message-Id: <1463080364-1144-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 2.7.4 X-Topics: patch Subject: [lng-odp] [PATCH] 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 --- CONTRIBUTING | 101 ++++++++++++++++++++++++++---------------- doc/process-guide/.gitignore | 1 + doc/process-guide/Makefile.am | 11 ++++- 3 files changed, 72 insertions(+), 41 deletions(-) diff --git a/CONTRIBUTING b/CONTRIBUTING index f2f8947..16175ac 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,67 @@ 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 + ` syntax. For example text referring to the type odp_pktio_t would decorate the type thus:- - +odp_pktio_t+ + [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. - 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