Mercurial > public > mercurial-scm > hg
comparison contrib/check-code.py @ 28053:34a2944aac9b
check-code: add rule to detect usage of external diff via extdiff
This rule detects "hg extdiff" invocation without -p/--program and
-o/--option.
This patch specifies "-p diff" explicitly in test-extdiff.t to avoid
false positive matching.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Thu, 11 Feb 2016 02:15:45 +0900 |
parents | 7e9e39228de6 |
children | 97fe88806f6f |
comparison
equal
deleted
inserted
replaced
28052:b59ef0c21405 | 28053:34a2944aac9b |
---|---|
184 "use '@@ -N* +N,n @@ (glob)' style chunk header for portability"), | 184 "use '@@ -N* +N,n @@ (glob)' style chunk header for portability"), |
185 (r'^ @@ -[0-9]+,[0-9]+ [+][0-9]+ @@', | 185 (r'^ @@ -[0-9]+,[0-9]+ [+][0-9]+ @@', |
186 "use '@@ -N,n +N* @@ (glob)' style chunk header for portability"), | 186 "use '@@ -N,n +N* @@ (glob)' style chunk header for portability"), |
187 (r'^ @@ -[0-9]+ [+][0-9]+ @@', | 187 (r'^ @@ -[0-9]+ [+][0-9]+ @@', |
188 "use '@@ -N* +N* @@ (glob)' style chunk header for portability"), | 188 "use '@@ -N* +N* @@ (glob)' style chunk header for portability"), |
189 (uprefix + r'hg( +-[^ ]+( +[^ ]+)?)* +extdiff' | |
190 r'( +(-[^ po-]+|--(?!program|option)[^ ]+|[^-][^ ]*))*$', | |
191 "use $RUNTESTDIR/pdiff via extdiff (or -o/-p for false-positives)"), | |
189 ], | 192 ], |
190 # warnings | 193 # warnings |
191 [ | 194 [ |
192 (r'^ [^*?/\n]* \(glob\)$', | 195 (r'^ [^*?/\n]* \(glob\)$', |
193 "glob match with no glob character (?*/)"), | 196 "glob match with no glob character (?*/)"), |