2008/12/8 Martin Pool <span dir="ltr">&lt;<a href="mailto:mbp@canonical.com">mbp@canonical.com</a>&gt;</span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Sun, Jul 27, 2008 at 6:19 AM, John Arbash Meinel<br>
&lt;<a href="mailto:john@arbash-meinel.com">john@arbash-meinel.com</a>&gt; wrote:<br>
&gt; -----BEGIN PGP SIGNED MESSAGE-----<br>
&gt; Hash: SHA1<br>
&gt;<br>
&gt; Marius Kruger wrote:<br>
&gt; | Thats right folks,<br>
&gt; | &nbsp;I think I&#39;ve successfully written a test which checks for bazaar code<br>
&gt; | style regressions in the not-yet-commited changes of the working tree<br>
&gt; | being tested.<br>
&gt; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Currently I check all newly modified .py files for:<br>
&gt; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; * new trailing white space<br>
&gt; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; * new leading tabs<br>
&gt; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; * new long lines (give warning only)<br>
&gt; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; * no newline at end of files<br>
&gt; |<br>
&gt; | It already came in usefull while preparing this patch<br>
&gt; | ./bzr --no-plugins selftest coding_style<br>
&gt; | will help people like me to easily prepare non-style-regressing patches.<br>
<br>
</div>That&#39;s pretty cool.</blockquote><div>yeay<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Like John, I think I&#39;d prefer this be done in test_source </blockquote><div>thats done in the latest patch<br>&nbsp;<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
and check<br>
the whole working tree, except for things that are specifically<br>
excluded, such as copied-in library source. &nbsp;Then there&#39;s no chance of<br>
missing things that are committed without checking them. &nbsp;If there are<br>
already things that would fail, let&#39;s just fix them up.</blockquote><div><br></div></div>Uhm, last time I checked, the bazaar source is riddled with trailing white space, try:<br>bzr.dev&gt;$ find -iname &quot;*.py&quot; | xargs grep -n -e &quot;.* $&quot; |wc -l<br>
3319<br><br>People have tried to remove it previously, but got it shot down. See eg:<br><a href="http://www.nabble.com/-MERGE--whitespace-normalization-td18634412.html">http://www.nabble.com/-MERGE--whitespace-normalization-td18634412.html</a><br>
<br>So My plan for now was to just *not* allow the situation to regress (which might in itself prove too painful).<br><br>regards<br>marius<br><br>