When multiple developers commit to a shared repo, accidental inconsistencies in whitespace and line endings can be introduced by different factors including the different editors and editor setting the authors use.
Some optional pre-commit hooks could be used to help prevent these accidental inconsistencies from being introduced. A starting example hooks could check for svn:eol-style in svn repos or check that all line endings are \n instead of \r\n in git repos on certain file types. A more complex hook could check that files end in a newline (keeps you from ever seeing that ugly '\ No newline at end of file
' in a diff), there is no trailing whitespace before a newline, and spaces are not used before tabs in indentation. These could all be individual options on a web interface or come as an all or nothing option.
- 2 comments
- Last updated
- Jul 24, 2013
- Aug 11, 2008
- Declined - We decided not to take action on this ticket.
- Enhancement - A change which is intended to better the project in some way
- Low - Might slip to a later milestone.