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)