[python-committers] Deny nonbreaking spaces in the precommit script?
Georg Brandl
g.brandl at gmx.net
Mon Nov 8 17:05:34 CET 2010
Am 08.11.2010 15:30, schrieb Łukasz Langa:
> Am 08.11.2010 15:04, schrieb Benjamin Peterson:
>> I don't think you can ever automate "checking for mistakes" out of the
>> workflow. There will never be a commit hook that checks whether you
>> created a race condition or deference possibly uninitialized memory.
>
> That goes without saying. Then again, with my post I was aiming at the
> subset of problems that can be caught automatically. You seem to be
> saying that spell checkers are useless because they don't guarantee that
> sentences make actual sense.
After the hg migration, I can only recommend my hgcodesmell extension
that takes care of checking for (at the moment) debugging leftovers or
merge conflict markers, but can easily be adapted to check for whatever
you fear will destroy your reputation as a committer...
http://bitbucket.org/birkenfeld/hgcodesmell/
It doesn't simply deny the commit, but rather gives you a diff of the
questionable change and asks whether to continue.
>> IMO, if you're unwilling to be looking for simple and complex bugs,
>> you should think twice before committing at all.
>
> Ouch. I am unwilling to accuse anybody of unwillingness ;-) It's obvious
> that every committer is obliged to do her best to ensure quality of each
> and every commit. This doesn't mean automated checks are unnecessary.
> Nor does that mean people advocating for more safety catches look for
> ways for being sloppy.
>
> Then again this discussion is already far too long for such a simple
> matter. So, to make matters a bit more productive:
>
> I am willing to convert existing SVN hooks to Mercurial and maintain
> them, if there's nobody doing that already.
That's already done; the whitespace checking hook we have for SVN
currently is ported and in the hg.python.org/hooks repo.
Georg
More information about the python-committers
mailing list