442 (r'{desc(\|(?!websub|firstline)[^\|]*)+}', |
442 (r'{desc(\|(?!websub|firstline)[^\|]*)+}', |
443 'follow desc keyword with either firstline or websub'), |
443 'follow desc keyword with either firstline or websub'), |
444 ] |
444 ] |
445 ] |
445 ] |
446 |
446 |
|
447 allfilesfilters = [] |
|
448 |
|
449 allfilespats = [ |
|
450 [ |
|
451 (r'(http|https)://[a-zA-Z0-9./]*selenic.com/', |
|
452 'use mercurial-scm.org domain URL'), |
|
453 ], |
|
454 # warnings |
|
455 [], |
|
456 ] |
|
457 |
447 checks = [ |
458 checks = [ |
448 ('python', r'.*\.(py|cgi)$', r'^#!.*python', pyfilters, pypats), |
459 ('python', r'.*\.(py|cgi)$', r'^#!.*python', pyfilters, pypats), |
449 ('test script', r'(.*/)?test-[^.~]*$', '', testfilters, testpats), |
460 ('test script', r'(.*/)?test-[^.~]*$', '', testfilters, testpats), |
450 ('c', r'.*\.[ch]$', '', cfilters, cpats), |
461 ('c', r'.*\.[ch]$', '', cfilters, cpats), |
451 ('unified test', r'.*\.t$', '', utestfilters, utestpats), |
462 ('unified test', r'.*\.t$', '', utestfilters, utestpats), |
454 ('layering violation ui in util', r'mercurial/util\.py', '', pyfilters, |
465 ('layering violation ui in util', r'mercurial/util\.py', '', pyfilters, |
455 inutilpats), |
466 inutilpats), |
456 ('txt', r'.*\.txt$', '', txtfilters, txtpats), |
467 ('txt', r'.*\.txt$', '', txtfilters, txtpats), |
457 ('web template', r'mercurial/templates/.*\.tmpl', '', |
468 ('web template', r'mercurial/templates/.*\.tmpl', '', |
458 webtemplatefilters, webtemplatepats), |
469 webtemplatefilters, webtemplatepats), |
|
470 ('all except for .po', r'.*(?<!\.po)$', '', |
|
471 allfilesfilters, allfilespats), |
459 ] |
472 ] |
460 |
473 |
461 def _preparepats(): |
474 def _preparepats(): |
462 for c in checks: |
475 for c in checks: |
463 failandwarn = c[-1] |
476 failandwarn = c[-1] |