Show More
@@ -13,14 +13,16 b' import sys' | |||
|
13 | 13 | foundopts = {} |
|
14 | 14 | documented = {} |
|
15 | 15 | |
|
16 |
configre = (r"""ui\.config(|int|bool|list)\(['"](\S+)['"], |
|
|
17 | r"""['"](\S+)['"](,\s(?:default=)?(\S+?))?\)""") | |
|
16 | configre = (r"""ui\.config(|int|bool|list)\(['"](\S+)['"],\s*""" | |
|
17 | r"""['"](\S+)['"](,\s+(?:default=)?(\S+?))?\)""") | |
|
18 | configpartialre = (r"""ui\.config""") | |
|
18 | 19 | |
|
19 | 20 | def main(args): |
|
20 | 21 | for f in args: |
|
21 | 22 | sect = '' |
|
22 | 23 | prevname = '' |
|
23 | 24 | confsect = '' |
|
25 | carryover = '' | |
|
24 | 26 | for l in open(f): |
|
25 | 27 | |
|
26 | 28 | # check topic-like bits |
@@ -67,7 +69,8 b' def main(args):' | |||
|
67 | 69 | documented[m.group(1)] = 1 |
|
68 | 70 | |
|
69 | 71 | # look for code-like bits |
|
70 |
|
|
|
72 | line = carryover + l | |
|
73 | m = re.search(configre, line, re.MULTILINE) | |
|
71 | 74 | if m: |
|
72 | 75 | ctype = m.group(1) |
|
73 | 76 | if not ctype: |
@@ -83,6 +86,13 b' def main(args):' | |||
|
83 | 86 | print "conflict on %s: %r != %r" % (name, (ctype, default), |
|
84 | 87 | foundopts[name]) |
|
85 | 88 | foundopts[name] = (ctype, default) |
|
89 | carryover = '' | |
|
90 | else: | |
|
91 | m = re.search(configpartialre, line) | |
|
92 | if m: | |
|
93 | carryover = line | |
|
94 | else: | |
|
95 | carryover = '' | |
|
86 | 96 | |
|
87 | 97 | for name in sorted(foundopts): |
|
88 | 98 | if name not in documented: |
General Comments 0
You need to be logged in to leave comments.
Login now