contrib/check-code.py
changeset 21487 c26464ce0781
parent 21222 4840abc83970
child 21791 fb16f6da5b3b
--- a/contrib/check-code.py	Sat May 17 17:10:23 2014 +0800
+++ b/contrib/check-code.py	Sat May 17 17:11:06 2014 +0800
@@ -367,6 +367,16 @@
   []
 ]
 
+webtemplatefilters = []
+
+webtemplatepats = [
+  [],
+  [
+    (r'{desc(\|(?!websub|firstline)[^\|]*)+}',
+     'follow desc keyword with either firstline or websub'),
+  ]
+]
+
 checks = [
     ('python', r'.*\.(py|cgi)$', r'^#!.*python', pyfilters, pypats),
     ('test script', r'(.*/)?test-[^.~]*$', '', testfilters, testpats),
@@ -377,6 +387,8 @@
     ('layering violation ui in util', r'mercurial/util\.py', '', pyfilters,
      inutilpats),
     ('txt', r'.*\.txt$', '', txtfilters, txtpats),
+    ('web template', r'mercurial/templates/.*\.tmpl', '',
+     webtemplatefilters, webtemplatepats),
 ]
 
 def _preparepats():