diff contrib/check-code.py @ 18960:170fc0949fb6

check-code: check txt files for trailing whitespace
author Mads Kiilerich <madski@unity3d.com>
date Mon, 15 Apr 2013 01:37:23 +0200
parents 2f6418d8a4c9
children 341083b02d1b
line wrap: on
line diff
--- a/contrib/check-code.py	Mon Apr 15 01:37:23 2013 +0200
+++ b/contrib/check-code.py	Mon Apr 15 01:37:23 2013 +0200
@@ -237,6 +237,15 @@
           (?P=quote))""", reppython),
 ]
 
+txtfilters = []
+
+txtpats = [
+  [
+    ('\s$', 'trailing whitespace'),
+  ],
+  []
+]
+
 cpats = [
   [
     (r'//', "don't use //-style comments"),
@@ -292,6 +301,7 @@
      inrevlogpats),
     ('layering violation ui in util', r'mercurial/util\.py', pyfilters,
      inutilpats),
+    ('txt', r'.*\.txt$', txtfilters, txtpats),
 ]
 
 class norepeatlogger(object):