365 ], |
365 ], |
366 # warnings |
366 # warnings |
367 [] |
367 [] |
368 ] |
368 ] |
369 |
369 |
|
370 webtemplatefilters = [] |
|
371 |
|
372 webtemplatepats = [ |
|
373 [], |
|
374 [ |
|
375 (r'{desc(\|(?!websub|firstline)[^\|]*)+}', |
|
376 'follow desc keyword with either firstline or websub'), |
|
377 ] |
|
378 ] |
|
379 |
370 checks = [ |
380 checks = [ |
371 ('python', r'.*\.(py|cgi)$', r'^#!.*python', pyfilters, pypats), |
381 ('python', r'.*\.(py|cgi)$', r'^#!.*python', pyfilters, pypats), |
372 ('test script', r'(.*/)?test-[^.~]*$', '', testfilters, testpats), |
382 ('test script', r'(.*/)?test-[^.~]*$', '', testfilters, testpats), |
373 ('c', r'.*\.[ch]$', '', cfilters, cpats), |
383 ('c', r'.*\.[ch]$', '', cfilters, cpats), |
374 ('unified test', r'.*\.t$', '', utestfilters, utestpats), |
384 ('unified test', r'.*\.t$', '', utestfilters, utestpats), |
375 ('layering violation repo in revlog', r'mercurial/revlog\.py', '', |
385 ('layering violation repo in revlog', r'mercurial/revlog\.py', '', |
376 pyfilters, inrevlogpats), |
386 pyfilters, inrevlogpats), |
377 ('layering violation ui in util', r'mercurial/util\.py', '', pyfilters, |
387 ('layering violation ui in util', r'mercurial/util\.py', '', pyfilters, |
378 inutilpats), |
388 inutilpats), |
379 ('txt', r'.*\.txt$', '', txtfilters, txtpats), |
389 ('txt', r'.*\.txt$', '', txtfilters, txtpats), |
|
390 ('web template', r'mercurial/templates/.*\.tmpl', '', |
|
391 webtemplatefilters, webtemplatepats), |
380 ] |
392 ] |
381 |
393 |
382 def _preparepats(): |
394 def _preparepats(): |
383 for c in checks: |
395 for c in checks: |
384 failandwarn = c[-1] |
396 failandwarn = c[-1] |