aboutsummaryrefslogtreecommitdiff
path: root/test/lint/lint-rpc-help.sh
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-11-13 18:22:27 -0500
committerMarcoFalke <falke.marco@gmail.com>2018-11-14 12:11:06 -0500
commitfa520e72f7b5964cea1ade666e71212914556cf3 (patch)
tree882c4e881b8397568e5c41139c128446d8994aab /test/lint/lint-rpc-help.sh
parente74649e95122c9c61aadf607461cf701c3953f88 (diff)
lint: Must use RPCHelpMan to generate the RPC docs
Diffstat (limited to 'test/lint/lint-rpc-help.sh')
-rwxr-xr-xtest/lint/lint-rpc-help.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/lint/lint-rpc-help.sh b/test/lint/lint-rpc-help.sh
new file mode 100755
index 0000000000..602396745f
--- /dev/null
+++ b/test/lint/lint-rpc-help.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2018 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+export LC_ALL=C
+
+EXIT_CODE=0
+non_autogenerated_help=$(grep --perl-regexp --null-data --only-matching 'runtime_error\(\n\s*".*\\n"\n' $(git ls-files -- "*.cpp"))
+if [[ ${non_autogenerated_help} != "" ]]; then
+ echo "Must use RPCHelpMan to generate the help for the following RPC methods:"
+ echo "${non_autogenerated_help}"
+ echo
+ EXIT_CODE=1
+fi
+exit ${EXIT_CODE}