test_source harmful?

Ben Finney bignose+hates-spam at benfinney.id.au
Fri Feb 27 03:08:35 GMT 2009


Robert Collins <robert.collins at canonical.com> writes:

> On Wed, 2009-02-25 at 11:37 +0200, Marius Kruger wrote:
> > Our policy at work is to not have trailing whitespace because it
> > is too difficult to see what really happend or merge when somebody
> > went crazy with whitespace (lots of accidental changes; most
> > programmers don't check their diffs before committing)
> 
> Sound like you agree: we should not have the whitespace check in
> test_source, instead we should deal with any small issues that
> happen - and file bugs to provide feedback on where bzr needs to
> improve.

This assumes that Bazaar is the only tool that will be comparing these
files, but that's not true. Dealing with trailing white space in one
tool doesn't help other tools.

If trailing white space is a problem (which is for a given team to
decide), it makes the most sense for them to eradicate it from the
code base and have an enforced policy to prevent it getting back in.

> > thats why I made the bzr-text-checker plugin to warn you about it
> > at commit time, or prevent you from committing it in the first
> > place. https://launchpad.net/bzr-text-checker Content filtering
> > should be able to remove it automatically for you in the future.
> 
> This ignores the issue: Trailing whitespace is not structurally bad;
> it doesn't cause bugs; it might _rarely_ cause merge conflicts.
> Checking that something unimportant is set to a particular value is
> still checking something unimportant.

Is it true, though, that the Bazaar team considers trailing
whitespace, and the problems caused by it, to be unimportant?

> I don't want to be trained to jump though an unnecessary hoop: I
> want to remove the hoop.

Again, that's obviated (while preserving the enforced policy) by
configuring your text editor to remove trailing white space
automatically.

> But trailing whitespace doesn't matter in terms of quality any more
> than too much or too little VWS matters. We don't have tests for
> those things because they don't matter as far as the test suite is
> concerned. The test suite exists to serve us in developing robust
> high quality code for our users.

That's the question. Does the Bazaar team consider trailing white
space to be a quality regression?

-- 
 \      “I know the guy who writes all those bumper stickers. He hates |
  `\                                         New York.” —Steven Wright |
_o__)                                                                  |
Ben Finney




More information about the bazaar mailing list