[PATCH 2 of 2] tests: run check-code with warnings and maintain a whitelist

Mads Kiilerich mads at kiilerich.com
Wed Nov 23 04:55:17 CST 2011


On 11/23/2011 03:14 AM, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich<mads at kiilerich.com>
> # Date 1322014464 -3600
> # Node ID 7ca664237e0d0f6a42c738561a362374b5eb5ebb
> # Parent  3f3f187783e65b5e3ff34cbbc8726985d9363c77
> tests: run check-code with warnings and maintain a whitelist
>
> check-code has fine warning checks, but they are a bit noisy and nobody used
> them.
>
> Now the warnings will be run in the test suite, where a list of accepted
> warnings will be maintained.
>
> Those who introduce or touch a line with a warning will now have to update the
> whitelist ... or fix the warning.
>
> diff --git a/tests/test-check-code-hg.py.out b/tests/test-check-code-hg.py.out
> new file mode 100644
> --- /dev/null
> +++ b/tests/test-check-code-hg.py.out
> @@ -0,0 +1,656 @@
> +errors:
> +warnings (without line numbers):
> +/home/mk/hg/contrib/check-code.py:0:

timeless points out that I forgot this remove the .py.out that was left 
over from the previous version. I will drop it in next version if other 
devs agree with the general approach.

The .t test uses the relative paths reported by 'hg manifest' - that is 
a positive side effect of dropping the .py test. The .py test could of 
course be improved too, but that would just make it more complex.

/Mads


More information about the Mercurial-devel mailing list