From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id B20F9138CA2 for ; Wed, 22 Apr 2015 20:55:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4FE41E076D; Wed, 22 Apr 2015 20:55:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DBED0E076D for ; Wed, 22 Apr 2015 20:55:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9BF23340A0E for ; Wed, 22 Apr 2015 20:55:46 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8898F16829 for ; Wed, 22 Apr 2015 20:55:42 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <1429736080.ebc32aadada564095b70f0ff439a9863102a2ae5.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: / X-VCS-Repository: proj/openrc X-VCS-Files: STYLE STYLE-GUIDE.md X-VCS-Directories: / X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: ebc32aadada564095b70f0ff439a9863102a2ae5 X-VCS-Branch: master Date: Wed, 22 Apr 2015 20:55:42 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: cefe4de5-47eb-46cb-8b75-dd9c17226119 X-Archives-Hash: 276167ba1cf3836360f7886fe85bea3f commit: ebc32aadada564095b70f0ff439a9863102a2ae5 Author: William Hubbs gmail com> AuthorDate: Wed Apr 22 20:54:40 2015 +0000 Commit: William Hubbs gentoo org> CommitDate: Wed Apr 22 20:54:40 2015 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=ebc32aad Convert style guide to markdown STYLE => STYLE-GUIDE.md | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/STYLE b/STYLE-GUIDE.md similarity index 73% rename from STYLE rename to STYLE-GUIDE.md index 44ff1d5..6c1fcf2 100644 --- a/STYLE +++ b/STYLE-GUIDE.md @@ -1,23 +1,23 @@ +# OpenRC Style Guide + This is the openrc style manual. It governs the coding style of all code in this repository. Follow it. Contact openrc@gentoo.org for any questions or fixes you might notice. -########## -# C CODE # -########## +## C CODE -The BSD Kernel Normal Form (KNF) style is used: - http://en.wikipedia.org/wiki/Indent_style#BSD_KNF_style -Basically, it's like K&R/LKML, but wrapped lines that are indented use 4 spaces. +The BSD Kernel Normal Form (KNF) style is used [1]. Basically, it is like +K&R/LKML, but wrapped lines that are indented use 4 spaces. Here are the +highlights. -Highlights: - - no trailing whitespace - - indented code use tabs (not line wrapped) - - cuddle the braces (except for functions) - - space after native statements and before paren (for/if/while/...) - - no space between function and paren - - pointer asterisk cuddles the variable, not the type +- no trailing whitespace +- indented code use tabs (not line wrapped) +- cuddle the braces (except for functions) +- space after native statements and before paren (for/if/while/...) +- no space between function and paren +- pointer asterisk cuddles the variable, not the type +``` void foo(int c) { int ret = 0; @@ -32,16 +32,15 @@ void foo(int c) return ret; } +``` -################## -# COMMIT MESSAGES # -################## +## COMMIT MESSAGES The following is an example of a correctly formatted git commit message for this repository. Most of this information came from this blog post -[1], so I would like to thank the author. +[2], so I would like to thank the author. -### cut here ### +``` Capitalized, short (50 chars or less) summary More detailed explanatory text, if necessary. Wrap it to about 72 @@ -67,7 +66,7 @@ Further paragraphs come after blank lines. Reported-by: User Name X-[Distro]-Bug: BugID X-[Distro]-Bug-URL: URL for the bug (on the distribution's web site typically) -### cut here ### +``` If you did not write the code and the patch does not include authorship information in a format git can use, please use the --author option of the @@ -81,5 +80,5 @@ different from the author and committer. *BSD. Also, [Distro] should be replaced with the name of the distribution, e.g. X-Gentoo-Bug. -[1] http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html - +[1] http://en.wikipedia.org/wiki/Indent_style#BSD_KNF_style +[2] http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html