Index: docs/CodingStandards.rst =================================================================== --- docs/CodingStandards.rst +++ docs/CodingStandards.rst @@ -494,8 +494,8 @@ This is one of many contentious issues in coding standards, but it is not up for debate. -Use Spaces Instead of Tabs -^^^^^^^^^^^^^^^^^^^^^^^^^^ +Whitespace +^^^^^^^^^^ In all cases, prefer spaces to tabs in source files. People have different preferred indentation levels, and different styles of indentation that they @@ -509,6 +509,24 @@ of indentation. Also, do not reindent a whole source file: it makes for incredible diffs that are absolutely worthless. +Do not commit changes that include trailing whitespace. Some common editors will +automatically remove trailing whitespace when saving a file which causes +unrelated changes to appear in diffs and commits. + +Commits with No Functional Change +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +It is permissible to commit changes without prior review when the changes have +no semantic impact on the code. For instance, removing trailing whitespace from +a line, fixing a line ending to be consistent with the rest of the file, fixing +a typo in a comment, code formatting, etc. However, such changes should also be +highly localized. The commit message should clearly state that the commit is not +intended to change functionality, usually by stating it is :ref:`NFC `. + +However, do not commit sweeping NFC changes across numerous files without +getting prior code review, because the amount of churn may outweigh the benefit +of the proposed changes. + Indent Code Consistently ^^^^^^^^^^^^^^^^^^^^^^^^ Index: docs/Lexicon.rst =================================================================== --- docs/Lexicon.rst +++ docs/Lexicon.rst @@ -185,6 +185,7 @@ N - +.. _nfc: **NFC** "No functional change". Used in a commit message to indicate that a patch