[PATCH 5 of 5] code-check: warn about glob match with no glob character (? or *)

Simon Heimberg simohe at besonet.ch
Fri Oct 12 11:43:24 CDT 2012


# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# Date 1350059530 -7200
# Node ID c79765730e50c3bc054515184831aa4fded02403
# Parent  36dcf981a587302085b47067c96576f11746e550
code-check: warn about glob match with no glob character (? or *)

diff -r 36dcf981a587 -r c79765730e50 contrib/check-code.py
--- a/contrib/check-code.py	Fre Okt 12 18:31:00 2012 +0200
+++ b/contrib/check-code.py	Fre Okt 12 18:32:10 2012 +0200
@@ -102,7 +102,10 @@
     (uprefix + r'\s', "don't indent commands, use > for continued lines"),
   ],
   # warnings
-  []
+  [
+    (r'^  [^*?\n]* \(glob\)$',
+     "warning: glob match with no glob character (?*)"),
+  ]
 ]
 
 for i in [0, 1]:


More information about the Mercurial-devel mailing list