[PATCH 1 of 2] check-code: no-check-code must be after a comment sign and a space

Augie Fackler raf at durin42.com
Tue Nov 12 13:28:31 CST 2013


On Tue, Nov 12, 2013 at 12:40:10AM +0100, Simon Heimberg wrote:
> # HG changeset patch
> # User Simon Heimberg <simohe at besonet.ch>
> # Date 1383988925 -3600
> #      Sat Nov 09 10:22:05 2013 +0100
> # Node ID 82010fa54edb068ccd57373ab65fc9517d20b0d1
> # Parent  93e5a876c2ff2095c07944aaf3426b509eb498f5
> check-code: no-check-code must be after a comment sign and a space
>
> This is the format currently used everywhere.
>
> diff -r 93e5a876c2ff -r 82010fa54edb contrib/check-code.py
> --- a/contrib/check-code.py	Sat Nov 09 10:21:20 2013 +0100
> +++ b/contrib/check-code.py	Sat Nov 09 10:22:05 2013 +0100
> @@ -443,7 +443,7 @@
>              continue
>          pre = post = fp.read()
>          fp.close()
> -        if "no-" "check-code" in pre:
> +        if "# no-" "check-code" in pre:

Does check-code currently work on files that don't use # for comments?

Could we instead have a test-check-code test that'd grep for
'no-check-code' in a .t file? Would that be an easier check?

>              if debug:
>                  print "Skipping %s for %s it has no-" "check-code" % (
>                         name, f)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list