Patchwork [1,of,5] check-config: recognize convert style documentation

login
register
mail settings
Submitter timeless@mozdev.org
Date Dec. 8, 2015, 9:35 a.m.
Message ID <d8df9bd167f056abdc2f.1449567314@waste.org>
Download mbox | patch
Permalink /patch/11933/
State Accepted
Headers show

Comments

timeless@mozdev.org - Dec. 8, 2015, 9:35 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1449566573 0
#      Tue Dec 08 09:22:53 2015 +0000
# Node ID d8df9bd167f056abdc2ff3b9295a4b7e012a9fe0
# Parent  42aa0e570eaa364a622bc4443b0bcb79b1100a58
check-config: recognize convert style documentation

Patch

diff --git a/contrib/check-config.py b/contrib/check-config.py
--- a/contrib/check-config.py
+++ b/contrib/check-config.py
@@ -50,6 +50,11 @@ 
             if m:
                 documented[m.group(1)] = 1
 
+            # like convert
+            m = re.match(r'^\s*:(\S+\.\S+):\s+', l)
+            if m:
+                documented[m.group(1)] = 1
+
             # quoted in help or docstrings
             m = re.match(r'.*?``([-a-z_]+\.[-a-z_]+)``', l)
             if m:
diff --git a/tests/test-check-config-hg.t b/tests/test-check-config-hg.t
--- a/tests/test-check-config-hg.t
+++ b/tests/test-check-config-hg.t
@@ -6,22 +6,4 @@ 
 
   $ hg files "set:(**.py or **.txt) - tests/**" | sed 's|\\|/|g' |
   >   xargs python contrib/check-config.py
-  undocumented: convert.cvsps.cache (bool) [True]
-  undocumented: convert.cvsps.fuzz (str) [60]
-  undocumented: convert.cvsps.mergefrom (str)
-  undocumented: convert.cvsps.mergeto (str)
-  undocumented: convert.git.remoteprefix (str) ['remote']
-  undocumented: convert.git.similarity (int) [50]
-  undocumented: convert.hg.clonebranches (bool)
-  undocumented: convert.hg.ignoreerrors (bool)
-  undocumented: convert.hg.revs (str)
-  undocumented: convert.hg.saverev (bool)
-  undocumented: convert.hg.sourcename (str)
-  undocumented: convert.hg.startrev (str)
-  undocumented: convert.hg.tagsbranch (str) ['default']
-  undocumented: convert.hg.usebranchnames (bool) [True]
-  undocumented: convert.localtimezone (bool)
-  undocumented: convert.p4.startrev (str)
-  undocumented: convert.skiptags (bool)
   undocumented: convert.svn.debugsvnlog (bool) [True]
-  undocumented: convert.svn.startrev (str)