From 4f7885fd8cce1345b3aaa15ca9b8bf40cfc49e68 Mon Sep 17 00:00:00 2001 From: Richard Wackerbarth Date: Thu, 24 Sep 2015 16:00:58 -0500 Subject: [PATCH] Updated Coding Standards (mediawiki) --- Coding-Standards.mediawiki | 53 +++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 12 deletions(-) diff --git a/Coding-Standards.mediawiki b/Coding-Standards.mediawiki index a6455fa..508e28d 100644 --- a/Coding-Standards.mediawiki +++ b/Coding-Standards.mediawiki @@ -1,24 +1,53 @@ -The formatting of the source code is now controlled by the [[http://astyle.sourceforge.net/astyle.html|astyle]] program. The options which specify the style in use are found in the .astylerc file which is located in the top level folder of this repository. To reformat a file, run astyle --options=.astylerc . You will need to do this before committing the file to the git repository. +The formatting of the source code is now controlled by the [[http://astyle.sourceforge.net/astyle.html|astyle]] program. The options which specify the style in use are found in the .astylerc file which is located in the top level folder of this repository. To reformat a file, run astyle --options=.astylerc <file_name>. -Everything below is !!!OUTDATED!!! +The current style is specified by these options: +
+--style=google
+--keep-one-line-blocks
+ 
+--indent=spaces=2
+--indent-preproc-block
+--indent-preproc-define
+--indent-col1-comments
+ 
+--remove-brackets
+--break-after-logical
+--delete-empty-lines
+ 
+--pad-oper
+--pad-header
+--unpad-paren
+--align-pointer=type
+--align-reference=type
+ 
+--attach-classes
+--attach-inlines
+--keep-one-line-statements
+ 
+--indent-namespaces
+
+You will need to properly format all files offered for inclusion in our repositories. +The Travis Integration tool checks for compliance and will reject any submission that is not properly styled. -Please follow these coding standards for contributing code to Marlin. Pull requests which fail to follow good coding standards may be postponed for cleanup. +Do this before committing the file to a git repository. + == Useful links == * [Atmel AVR4027: Tips and Tricks to Optimize Your C Code for 8-bit AVR Microcontrollers](http://www.atmel.com/images/doc8453.pdf)