diff options
author | Josh Triplett <josht@linux.vnet.ibm.com> | 2007-07-16 02:41:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-16 12:05:50 -0400 |
commit | a923fd6ae7599aee63934ed13c3033fdefc7a18e (patch) | |
tree | ac1f5eac94ef7b6f3f92671146fc4be5a541a7fd /Documentation/CodingStyle | |
parent | 9e8c4273ef4f631a896650bd2ade4c1b6487131b (diff) |
CodingStyle: add information about trailing whitespace
Signed-off-by: Josh Triplett <josh@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/CodingStyle')
-rw-r--r-- | Documentation/CodingStyle | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle index b49b92edb396..00bffa7b740e 100644 --- a/Documentation/CodingStyle +++ b/Documentation/CodingStyle | |||
@@ -218,6 +218,18 @@ no space after the prefix increment & decrement unary operators: | |||
218 | 218 | ||
219 | and no space around the '.' and "->" structure member operators. | 219 | and no space around the '.' and "->" structure member operators. |
220 | 220 | ||
221 | Do not leave trailing whitespace at the ends of lines. Some editors with | ||
222 | "smart" indentation will insert whitespace at the beginning of new lines as | ||
223 | appropriate, so you can start typing the next line of code right away. | ||
224 | However, some such editors do not remove the whitespace if you end up not | ||
225 | putting a line of code there, such as if you leave a blank line. As a result, | ||
226 | you end up with lines containing trailing whitespace. | ||
227 | |||
228 | Git will warn you about patches that introduce trailing whitespace, and can | ||
229 | optionally strip the trailing whitespace for you; however, if applying a series | ||
230 | of patches, this may make later patches in the series fail by changing their | ||
231 | context lines. | ||
232 | |||
221 | 233 | ||
222 | Chapter 4: Naming | 234 | Chapter 4: Naming |
223 | 235 | ||