# HG changeset patch # User Gregory Szorc # Date 1497549516 25200 # Node ID e9fc5550be46ca43f55b9dbc2738c0ff7c22d310 # Parent 485b8e87e24461edfbf481e4f58097fe5a2f98c9 check-config: look for ui.configwith We previously weren't looking for this config helper. And, surprise, profiling.py references config options without docs. If I tried hard enough, I could have combined the regexps using a positive lookbehind assertion or something. But I didn't want to make my brain explode. At some point, we should probably do this linting at the tokenizer or ast layer. I'm not willing to open that can of worms right now. diff -r 485b8e87e244 -r e9fc5550be46 contrib/check-config.py --- a/contrib/check-config.py Thu Jun 15 10:38:19 2017 -0700 +++ b/contrib/check-config.py Thu Jun 15 10:58:36 2017 -0700 @@ -24,6 +24,16 @@ (?:default=)?(?P\S+?))? \)''', re.VERBOSE | re.MULTILINE) +configwithre = re.compile(''' + ui\.config(?Pwith)\( + # First argument is callback function. This doesn't parse robustly + # if it is e.g. a function call. + [^,]+,\s* + ['"](?P
\S+)['"],\s* + ['"](?P