Mercurial > hg
comparison contrib/check-code.py @ 32182:ac641a41f98d
check-code: rewrite py3 exclusion pattern with negative lookahead
I want to add more patterns, but negative lookbehind requires patterns of
the same length so not useful.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 01 May 2017 17:10:22 +0900 |
parents | 14c5a7637ecc |
children | 41d79475d440 |
comparison
equal
deleted
inserted
replaced
32181:b98ee1a808bd | 32182:ac641a41f98d |
---|---|
490 ] | 490 ] |
491 | 491 |
492 checks = [ | 492 checks = [ |
493 ('python', r'.*\.(py|cgi)$', r'^#!.*python', pyfilters, pypats), | 493 ('python', r'.*\.(py|cgi)$', r'^#!.*python', pyfilters, pypats), |
494 ('python', r'.*hgext.*\.py$', '', [], pyextnfpats), | 494 ('python', r'.*hgext.*\.py$', '', [], pyextnfpats), |
495 ('python 3', r'.*(hgext|mercurial).*(?<!pycompat)\.py', '', | 495 ('python 3', r'.*(hgext|mercurial)/(?!pycompat).*\.py', '', |
496 pyfilters, py3pats), | 496 pyfilters, py3pats), |
497 ('test script', r'(.*/)?test-[^.~]*$', '', testfilters, testpats), | 497 ('test script', r'(.*/)?test-[^.~]*$', '', testfilters, testpats), |
498 ('c', r'.*\.[ch]$', '', cfilters, cpats), | 498 ('c', r'.*\.[ch]$', '', cfilters, cpats), |
499 ('unified test', r'.*\.t$', '', utestfilters, utestpats), | 499 ('unified test', r'.*\.t$', '', utestfilters, utestpats), |
500 ('layering violation repo in revlog', r'mercurial/revlog\.py', '', | 500 ('layering violation repo in revlog', r'mercurial/revlog\.py', '', |