Skip to content

Commit fa520e7

Browse files
author
MarcoFalke
committed
lint: Must use RPCHelpMan to generate the RPC docs
1 parent e74649e commit fa520e7

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/lint/lint-rpc-help.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) 2018 The Bitcoin Core developers
4+
# Distributed under the MIT software license, see the accompanying
5+
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
6+
7+
export LC_ALL=C
8+
9+
EXIT_CODE=0
10+
non_autogenerated_help=$(grep --perl-regexp --null-data --only-matching 'runtime_error\(\n\s*".*\\n"\n' $(git ls-files -- "*.cpp"))
11+
if [[ ${non_autogenerated_help} != "" ]]; then
12+
echo "Must use RPCHelpMan to generate the help for the following RPC methods:"
13+
echo "${non_autogenerated_help}"
14+
echo
15+
EXIT_CODE=1
16+
fi
17+
exit ${EXIT_CODE}

0 commit comments

Comments
 (0)