##// END OF EJS Templates
check-config: look for ui.configwith...
Gregory Szorc -
r32849:e9fc5550 default
parent child Browse files
Show More
@@ -24,6 +24,16 b" configre = re.compile(r'''"
24 (?:default=)?(?P<default>\S+?))?
24 (?:default=)?(?P<default>\S+?))?
25 \)''', re.VERBOSE | re.MULTILINE)
25 \)''', re.VERBOSE | re.MULTILINE)
26
26
27 configwithre = re.compile('''
28 ui\.config(?P<ctype>with)\(
29 # First argument is callback function. This doesn't parse robustly
30 # if it is e.g. a function call.
31 [^,]+,\s*
32 ['"](?P<section>\S+)['"],\s*
33 ['"](?P<option>\S+)['"](,\s+
34 (?:default=)?(?P<default>\S+?))?
35 \)''', re.VERBOSE | re.MULTILINE)
36
27 configpartialre = (r"""ui\.config""")
37 configpartialre = (r"""ui\.config""")
28
38
29 def main(args):
39 def main(args):
@@ -79,7 +89,7 b' def main(args):'
79
89
80 # look for code-like bits
90 # look for code-like bits
81 line = carryover + l
91 line = carryover + l
82 m = configre.search(line)
92 m = configre.search(line) or configwithre.search(line)
83 if m:
93 if m:
84 ctype = m.group('ctype')
94 ctype = m.group('ctype')
85 if not ctype:
95 if not ctype:
@@ -33,3 +33,5 b' New errors are not allowed. Warnings are'
33
33
34 $ hg files "set:(**.py or **.txt) - tests/**" | sed 's|\\|/|g' |
34 $ hg files "set:(**.py or **.txt) - tests/**" | sed 's|\\|/|g' |
35 > python contrib/check-config.py
35 > python contrib/check-config.py
36 undocumented: profiling.showmax (with) [0.999]
37 undocumented: profiling.showmin (with) [0.005]
General Comments 0
You need to be logged in to leave comments. Login now