Patchwork [6,of,6,v2] check-code: enforce (glob) on output lines containing 127.0.0.1

login
register
mail settings
Submitter Augie Fackler
Date July 12, 2016, 7:49 p.m.
Message ID <ce172f4c9d4ec542e39a.1468352993@arthedain.pit.corp.google.com>
Download mbox | patch
Permalink /patch/15808/
State Accepted
Headers show

Comments

Augie Fackler - July 12, 2016, 7:49 p.m.
# HG changeset patch
# User Augie Fackler <raf@durin42.com>
# Date 1468119843 14400
#      Sat Jul 09 23:04:03 2016 -0400
# Node ID ce172f4c9d4ec542e39a19c2767a63b8f9e6ede6
# Parent  86931eb4cd856f5f9d680a2d6137ad430c1f1f05
check-code: enforce (glob) on output lines containing 127.0.0.1

Patch

diff --git a/contrib/check-code.py b/contrib/check-code.py
--- a/contrib/check-code.py
+++ b/contrib/check-code.py
@@ -189,6 +189,8 @@  utestpats = [
     (r'^  .*: largefile \S+ not available from file:.*/.*[^)]$', winglobmsg),
     (r'^  .*file://\$TESTTMP',
      'write "file:/*/$TESTTMP" + (glob) to match on windows too'),
+    (r'^  [^$>].*27\.0\.0\.1.*[^)]$',
+     'use (glob) to match localhost IP on hosts without 127.0.0.1 too'),
     (r'^  (cat|find): .*: No such file or directory',
      'use test -f to test for file existence'),
     (r'^  diff -[^ -]*p',
@@ -207,8 +209,8 @@  utestpats = [
   ],
   # warnings
   [
-    (r'^  [^*?/\n]* \(glob\)$',
-     "glob match with no glob character (?*/)"),
+    (r'^  (?!.*127\.0\.0\.1)[^*?/\n]* \(glob\)$',
+     "glob match with no glob string (?, *, /, and 127.0.0.1)"),
   ]
 ]