Mercurial > public > mercurial-scm > hg-stable
comparison contrib/check-code.py @ 29520:57106f357cd1
check-code: enforce (glob) on output lines containing 127.0.0.1
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Sat, 09 Jul 2016 23:04:03 -0400 |
parents | f1fdd7e7d434 |
children | 075146e85bb6 |
comparison
equal
deleted
inserted
replaced
29519:fe7158fced4b | 29520:57106f357cd1 |
---|---|
187 (r'^ moving \S+/.*[^)]$', winglobmsg), | 187 (r'^ moving \S+/.*[^)]$', winglobmsg), |
188 (r'^ no changes made to subrepo since.*/.*[^)]$', winglobmsg), | 188 (r'^ no changes made to subrepo since.*/.*[^)]$', winglobmsg), |
189 (r'^ .*: largefile \S+ not available from file:.*/.*[^)]$', winglobmsg), | 189 (r'^ .*: largefile \S+ not available from file:.*/.*[^)]$', winglobmsg), |
190 (r'^ .*file://\$TESTTMP', | 190 (r'^ .*file://\$TESTTMP', |
191 'write "file:/*/$TESTTMP" + (glob) to match on windows too'), | 191 'write "file:/*/$TESTTMP" + (glob) to match on windows too'), |
192 (r'^ [^$>].*27\.0\.0\.1.*[^)]$', | |
193 'use (glob) to match localhost IP on hosts without 127.0.0.1 too'), | |
192 (r'^ (cat|find): .*: No such file or directory', | 194 (r'^ (cat|find): .*: No such file or directory', |
193 'use test -f to test for file existence'), | 195 'use test -f to test for file existence'), |
194 (r'^ diff -[^ -]*p', | 196 (r'^ diff -[^ -]*p', |
195 "don't use (external) diff with -p for portability"), | 197 "don't use (external) diff with -p for portability"), |
196 (r'^ [-+][-+][-+] .* [-+]0000 \(glob\)', | 198 (r'^ [-+][-+][-+] .* [-+]0000 \(glob\)', |
205 r'( +(-[^ po-]+|--(?!program|option)[^ ]+|[^-][^ ]*))*$', | 207 r'( +(-[^ po-]+|--(?!program|option)[^ ]+|[^-][^ ]*))*$', |
206 "use $RUNTESTDIR/pdiff via extdiff (or -o/-p for false-positives)"), | 208 "use $RUNTESTDIR/pdiff via extdiff (or -o/-p for false-positives)"), |
207 ], | 209 ], |
208 # warnings | 210 # warnings |
209 [ | 211 [ |
210 (r'^ [^*?/\n]* \(glob\)$', | 212 (r'^ (?!.*127\.0\.0\.1)[^*?/\n]* \(glob\)$', |
211 "glob match with no glob character (?*/)"), | 213 "glob match with no glob string (?, *, /, and 127.0.0.1)"), |
212 ] | 214 ] |
213 ] | 215 ] |
214 | 216 |
215 for i in [0, 1]: | 217 for i in [0, 1]: |
216 for tp in testpats[i]: | 218 for tp in testpats[i]: |