aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-11-15 12:19:41 -0500
committerMarcoFalke <falke.marco@gmail.com>2018-11-15 12:19:11 -0500
commitfa5e0452e875a7ca6bf6fe61fdd652d341eece40 (patch)
treedeb8e007d0e5d1bdf6ffb4f9bf81275504ec8905
parentfa91e8eda541acdb78ca481b74605639f319c108 (diff)
rpc: Documentation fixups
-rw-r--r--src/rpc/misc.cpp2
-rwxr-xr-xtest/lint/lint-rpc-help.sh7
2 files changed, 8 insertions, 1 deletions
diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp
index a6c90bd6d7..5543035885 100644
--- a/src/rpc/misc.cpp
+++ b/src/rpc/misc.cpp
@@ -461,7 +461,7 @@ static UniValue echo(const JSONRPCRequest& request)
throw std::runtime_error(
RPCHelpMan{"echo|echojson ...",
"\nSimply echo back the input arguments. This command is for testing.\n"
- "\nThe difference between echo and echojson is that echojson has argument conversion enabled in the client-side table in"
+ "\nThe difference between echo and echojson is that echojson has argument conversion enabled in the client-side table in "
"bitcoin-cli and the GUI. There is no server-side difference.",
{}}
.ToString() +
diff --git a/test/lint/lint-rpc-help.sh b/test/lint/lint-rpc-help.sh
index 602396745f..faac5d43e2 100755
--- a/test/lint/lint-rpc-help.sh
+++ b/test/lint/lint-rpc-help.sh
@@ -3,10 +3,17 @@
# 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:"