CurseForge

515 - Optional pre-commit hooks for whitespace consistency

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.

User When Change
Torhal Wed, 09 Nov 2011 17:17:37 Changed status from New to Accepted
Torhal Fri, 03 Jun 2011 16:58:52 Changed assigned to from None to prencher
Ackis Tue, 05 May 2009 16:36:45 Changed component from None to Component #18
Arrowmaster Mon, 11 Aug 2008 20:47:16 Create

You must login to post a comment. Don't have an account? Register to get one!

  • 2 comments
  • Avatar of profalbert profalbert Mon, 01 Jun 2009 09:41:22

    @spaces/tabs as indention: Actually I think in shared repositories, using tabs for indention is discouraged because tab-width depends on the editor used.

  • Avatar of anmoch anmoch Tue, 12 Aug 2008 12:38:42

    In Git we could also check that only annotated tags are pushed.

  • 2 comments

Facts

Last updated on
09 Nov 2011
Reported on
11 Aug 2008
Status
Accepted - Problem reproduced / Need acknowledged.
Type
Enhancement - A change which is intended to better the project in some way
Priority
Low - Might slip to a later milestone.

Reported by

Possible assignees

Votes (Total: +9, Average: +2.2)