{"thread":{"id":"12340","subject":"[PATCH] Document conding style","startedAt":"2008-02-27T08:13:30Z","lastAt":"2008-02-28T13:07:12Z","messageCount":4,"participants":["Martin Koegler","David Symonds","Johannes Schindelin","Jean-Luc Herren"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"70066","messageId":"12041000101604-git-send-email-mkoegler@auto.tuwien.ac.at","threadId":"12340","inReplyTo":null,"subject":"[PATCH] Document conding style","fromName":"Martin Koegler","fromEmail":"mkoegler@auto.tuwien.ac.at","sentAt":"2008-02-27T08:13:30Z","receivedAt":"2008-02-27T08:13:30Z","isPatch":true,"sender":{"key":"mkoegler@auto.tuwien.ac.at","avatar":null},"body":"Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>\n---\nDocumentation/CodingGuidelines |   27 +++++++++++++++++++++++++++\n 1 files changed, 27 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines\nindex 3b042db..e1b5d78 100644\n--- a/Documentation/CodingGuidelines\n+++ b/Documentation/CodingGuidelines\n@@ -77,6 +77,30 @@ For C programs:\n    of \"else if\" statements, it can make sense to add braces to\n    single line blocks.\n \n+ - Avoid trailing whitespaces\n+\n+ - Pointer to struct foo type is (struct foo *), not (struct foo*)\n+\n+ - One space each around comparison operator \"==\"\n+\n+ - One space around assignment operator \"=\"\n+\n+ - One space after \"if\", \"while\", \"switch\" and friends before \"(\"\n+\n+ - No space between function name and \"(\"\n+\n+ - A function without parameter is \"static void foo(void)\", not\n+   \"static void foo()\"\n+\n+ - Don't do any declaration after a statement.\n+\n+ - Multi-line comment is:\n+\n+        /*\n+         * This is multi line comment\n+         * and this is its second line.\n+         */\n+\n  - Try to make your code understandable.  You may put comments\n    in, but comments invariably tend to stale out when the code\n    they were describing changes.  Often splitting a function\n@@ -105,6 +129,9 @@ For C programs:\n    changed and discussed.  Many git commands started out like\n    that, and a few are still scripts.\n \n+ - Consider checking your patches with checkpatch from the linux \n+   kernel. It helps you to spot trivial formating errors.\n+\n  - Avoid introducing a new dependency into git. This means you\n    usually should stay away from scripting languages not already\n    used in the git core command set (unless your command is clearly\n-- \n1.5.4.3.ga3d8\n"},{"id":"70069","messageId":"ee77f5c20802270036o7e792feqd110b7ea96a3b75c@mail.gmail.com","threadId":"12340","inReplyTo":"12041000101604-git-send-email-mkoegler@auto.tuwien.ac.at","subject":"Re: [PATCH] Document conding style","fromName":"David Symonds","fromEmail":"dsymonds@gmail.com","sentAt":"2008-02-27T08:36:28Z","receivedAt":"2008-02-27T08:36:28Z","isPatch":true,"sender":{"key":"dsymonds@gmail.com","avatar":"https://gravatar.com/avatar/b22f5051cbfc11836e36cf7a690e6cde4e225d835e13295ff98d15c7a9ee3c0f?d=mp&s=160"},"body":"On Wed, Feb 27, 2008 at 7:13 PM, Martin Koegler\n<mkoegler@auto.tuwien.ac.at> wrote:\n>  + - Consider checking your patches with checkpatch from the linux\n>  +   kernel. It helps you to spot trivial formating errors.\n>  +\n\nConsider checking your spelling, too?  ;-)\n\n\nDave.\n"},{"id":"70074","messageId":"alpine.LSU.1.00.0802270941040.22527@racer.site","threadId":"12340","inReplyTo":"12041000101604-git-send-email-mkoegler@auto.tuwien.ac.at","subject":"Re: [PATCH] Document conding style","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-27T09:43:04Z","receivedAt":"2008-02-27T09:43:04Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\n[it is \"coding\", not \"conding\", and technically, it is already documented]\n\nAlternatively, we could repeat these lines from the existing \nCodingGuidelines 3 times:\n\n> As for more concrete guidelines, just imitate the existing code\n> (this is a good guideline, no matter which project you are\n> contributing to).\n\nAnd maybe hint at \"git diff --check\" _before_ committing?\n\nCiao,\nDscho\n"},{"id":"70254","messageId":"47C6B200.1080707@gmx.ch","threadId":"12340","inReplyTo":"12041000101604-git-send-email-mkoegler@auto.tuwien.ac.at","subject":"Re: [PATCH] Document conding style","fromName":"Jean-Luc Herren","fromEmail":"jlh@gmx.ch","sentAt":"2008-02-28T13:07:12Z","receivedAt":"2008-02-28T13:07:12Z","isPatch":true,"sender":{"key":"jlh@gmx.ch","avatar":null},"body":"Martin Koegler wrote:\n> + - Avoid trailing whitespaces\n> +\n\nMaybe it's worth mentioning that the default pre-commit hook does\nthat for you (among other things); you just need to enable it.\n\njlh\n"}]}