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,10 @@ 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. + Indent Code Consistently ^^^^^^^^^^^^^^^^^^^^^^^^ Index: docs/DeveloperPolicy.rst =================================================================== --- docs/DeveloperPolicy.rst +++ docs/DeveloperPolicy.rst @@ -392,6 +392,21 @@ encouraged to review other peoples' patches as well, but you aren't required to do so. +Commits with No Functional Change +--------------------------------- + +It may be permissible to commit changes without prior review when the changes +have no semantic impact on the code if the changes being made are obvious and +not invasive. For instance, removing trailing whitespace from a line, fixing a +line ending to be consistent with the rest of the file, fixing a typo, code +formatting, etc. Such changes should be highly localized and 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. + .. _discuss the change/gather consensus: Making a Major Change 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