fix: disable linter 'check-rpc-mapping.py' for composite commands

This linter is subject to remove in 20012 anyway, which is todo after 18531 is done
This commit is contained in:
Konstantin Akimov 2024-06-10 16:33:13 +07:00
parent f4bc19fb99
commit 9413ecdc66
No known key found for this signature in database
GPG Key ID: 2176C4A5D01EA524

View File

@ -60,6 +60,12 @@ def process_commands(fname):
in_rpcs = False
elif '{' in line and '"' in line:
m = re.search(r'{ *("[^"]*"), *("[^"]*"), *&([^,]*), *{([^}]*)} *},', line)
# that's a quick fix for composite command
# no proper implementation is needed so far as this linter would be removed soon with bitcoin#20012
if not m:
m = re.search(r'{ *("[^"]*"), *("[^"]*"), *("[^"]*"), *&([^,]*), *{([^}]*)} *},', line)
if m:
continue
assert m, 'No match to table expression: %s' % line
name = parse_string(m.group(2))
args_str = m.group(4).strip()