[MERGE] remove has_key() usage

John Arbash Meinel john at arbash-meinel.com
Wed Aug 30 19:57:00 BST 2006


Aaron Bentley wrote:
> John Arbash Meinel wrote:
> 
>>> If you want some more things to look for, we also need to remove
>>> trailing whitespace from lines.
> 
> Why do you feel a change like that is useful?  From my point of view
> trailing whitespace doesn't harm anything.
> 
> Aaron

Until you open a file in an editor setup to warn you about trailing
whitespace, and it shows up everywhere in bright red and makes you want
to fix everything right away, but you stay away because it would cause
bad patch logs. :)

I don't like trailing whitespace in general, so I enabled detection to
make sure I don't create more trailing whitespace. (It also would cause
problems in bundle munging, though we have to fix that anyway).

Also, it starts causing some really odd looking diffs, where you have:

- foo
+ foo

And the first one has whitespace that you don't see.
We can detect tab character violations, because lines don't end up lined up:

         some command
-        func()
+	func(bar)

I end up selecting the text, just to see where the lines end.

So no, it isn't a critical fix. But I think it is a little unhygenic to
have trailing whitespace. And when you set your editor to help you avoid
it, suddenly you see how bad it really is.

(The line in ~/.vimrc is "let python_highlight_space_errors = 1")

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060830/21effea1/attachment.pgp 


More information about the bazaar mailing list