##// END OF EJS Templates
check-code: add a rules to catch os.path.abspath...
marmoute -
r48435:752109dc default
parent child Browse files
Show More
@@ -545,6 +545,22 b' commonpyfilters = ['
545 545 ),
546 546 ]
547 547
548 # pattern only for mercurial and extensions
549 core_py_pats = [
550 [
551 # Windows tend to get confused about capitalization of the drive letter
552 #
553 # see mercurial.windows.abspath for details
554 (
555 r'os\.path\.abspath',
556 "use util.abspath instead (windows)",
557 r'#.*re-exports',
558 ),
559 ],
560 # warnings
561 [],
562 ]
563
548 564 # filters to convert normal *.py files
549 565 pyfilters = [] + commonpyfilters
550 566
@@ -700,6 +716,13 b' checks = ['
700 716 pyfilters,
701 717 py3pats,
702 718 ),
719 (
720 'core files',
721 r'.*(hgext|mercurial)/(?!demandimport|policy|pycompat).*\.py',
722 '',
723 pyfilters,
724 core_py_pats,
725 ),
703 726 ('test script', r'(.*/)?test-[^.~]*$', '', testfilters, testpats),
704 727 ('c', r'.*\.[ch]$', '', cfilters, cpats),
705 728 ('unified test', r'.*\.t$', '', utestfilters, utestpats),
General Comments 0
You need to be logged in to leave comments. Login now