Preparing a Patch for Review

From Einstein Toolkit Documentation
Jump to: navigation, search

Best Practices

  • Avoid saving tab characters in the patch. The main reason is that different text editors use different defaults to interpret tab characters as spaces. Also some people like to set 8 spaces as the default for a tab character while others prefer 4 or 3. The end result is that the proposed code will look unformatted, making hard to the eye to read and follow the code indentations. Possible ways to teach your text editor:
For vi family set the following in your .exrc:
 set expandtab
For emacs family add the following to your .emacs:
 (setq-default indent-tabs-mode nil);