Mercurial > hg
comparison contrib/check-config.py @ 27311:24a1c24fad6e
check-config: allow numbers in configs
p4...
author | timeless <timeless@mozdev.org> |
---|---|
date | Tue, 08 Dec 2015 09:09:01 +0000 |
parents | 9c98fe1416c2 |
children | f925d492113a |
comparison
equal
deleted
inserted
replaced
27310:9c98fe1416c2 | 27311:24a1c24fad6e |
---|---|
38 # check docstring bits | 38 # check docstring bits |
39 m = re.match(r'^\s+\[(\S+)\]', l) | 39 m = re.match(r'^\s+\[(\S+)\]', l) |
40 if m: | 40 if m: |
41 confsect = m.group(1) | 41 confsect = m.group(1) |
42 continue | 42 continue |
43 m = re.match(r'^\s+(?:#\s*)?([a-z._]+) = ', l) | 43 m = re.match(r'^\s+(?:#\s*)?(\S+) = ', l) |
44 if m: | 44 if m: |
45 name = confsect + '.' + m.group(1) | 45 name = confsect + '.' + m.group(1) |
46 documented[name] = 1 | 46 documented[name] = 1 |
47 | 47 |
48 # like the bugzilla extension | 48 # like the bugzilla extension |
49 m = re.match(r'^\s*([a-z]+\.[a-z]+)$', l) | 49 m = re.match(r'^\s*(\S+\.\S+)$', l) |
50 if m: | 50 if m: |
51 documented[m.group(1)] = 1 | 51 documented[m.group(1)] = 1 |
52 | 52 |
53 # like convert | 53 # like convert |
54 m = re.match(r'^\s*:(\S+\.\S+):\s+', l) | 54 m = re.match(r'^\s*:(\S+\.\S+):\s+', l) |
55 if m: | 55 if m: |
56 documented[m.group(1)] = 1 | 56 documented[m.group(1)] = 1 |
57 | 57 |
58 # quoted in help or docstrings | 58 # quoted in help or docstrings |
59 m = re.match(r'.*?``([-a-z_]+\.[-a-z_]+)``', l) | 59 m = re.match(r'.*?``(\S+\.\S+)``', l) |
60 if m: | 60 if m: |
61 documented[m.group(1)] = 1 | 61 documented[m.group(1)] = 1 |
62 | 62 |
63 # look for ignore markers | 63 # look for ignore markers |
64 m = re.search(r'# (?:internal|experimental|deprecated|developer)' | 64 m = re.search(r'# (?:internal|experimental|deprecated|developer)' |