Skip to content

Files

Latest commit

 

History

History
38 lines (19 loc) · 711 Bytes

trailing_whitespace.md

File metadata and controls

38 lines (19 loc) · 711 Bytes

Pattern: Trailing whitespace

Issue: -

Description

Adding trailing whitespace can cause extra work for others editing the same file, when they merge, as can removing existing trailing whitespace. So: Don't introduce trailing whitespace. Remove it if you're already changing that line, or do it in a separate clean-up operation (preferably when no-one else is working on the file).

Examples of correct code:

let name: String


//


// 


let name: String //


let name: String // 

Examples of incorrect code:

let name: String 


/* */ let name: String 

Further Reading