mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-31 10:56:03 +02:00
Merge #14726: Use RPCHelpMan for all RPCs
fa5e0452e8rpc: Documentation fixups (MarcoFalke)fa91e8eda5Use RPCHelpMan for all RPCs (MarcoFalke)fa520e72f7lint: Must use RPCHelpMan to generate the RPC docs (MarcoFalke) Pull request description: The resulting documentation should not change unless the type in the oneline-summary was previously incorrect. (E.g. string vs bool) Tree-SHA512: 4ff355b6a53178f02781e97a7aca7ee1d0d97ff348b6bf5a01caa1c96904ee33c704465fae54c2cd7445097427fd04c71ad3779bb7a7ed886055ef36c1b5a1d0
This commit is contained in:
24
test/lint/lint-rpc-help.sh
Executable file
24
test/lint/lint-rpc-help.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/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.
|
||||
#
|
||||
# Check that all RPC help texts are generated by RPCHelpMan.
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
EXIT_CODE=0
|
||||
|
||||
# Assume that all multiline strings passed into a runtime_error are help texts.
|
||||
# This is potentially fragile, but the linter is only temporary and can safely
|
||||
# be removed early 2019.
|
||||
|
||||
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}
|
||||
Reference in New Issue
Block a user