<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>On Jan 16, 2013, at 4:34 PM, Leandro Lucarella <<a href="mailto:luca@llucax.com.ar">luca@llucax.com.ar</a>> wrote:</div><blockquote type="cite"><blockquote type="cite"><br></blockquote><span></span><br><span>While you're at it, you could also add some checks for other common</span><br><span>white space errors. The sample pre-commit hook that comes with each</span><br><span>repository have this check enabled, you just have to enable that hook by</span><br><span>renaming it from pre-commit.sample to just pre-commit. Then you have to</span><br><span>adjust the git config core.whitespace to whatever you want to check</span><br><span>(there are several options, see git config --help for details).</span><br><span>Unfortunately those checks don't include either the CRLF check or the</span><br><span>"all spaces" (there is an option to check the opposite, that only tab is</span><br><span>used for indentation), but it cover other common errors as trailing</span><br><span>white spaces.</span><br></blockquote><br><div>If there's going to be advanced validation, maybe it's better to create a formatting tool similar to gofmt. If passing a source file through it alters the file, it fails. The tool can be shared and could help establish a standard format for D code (or at least Phobos code).</div><div><br></div><div>I've never used gofmt, but did find the following link online:</div><div><span style="font-family: '.HelveticaNeueUI'; font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); -webkit-text-size-adjust: none; "><a href="http://golangtutorials.blogspot.com/2011/06/formatting-go-code-with-gofmt.html">http://golangtutorials.blogspot.com/2011/06/formatting-go-code-with-gofmt.html</a></span></div></body></html>