From efa2f87b2c35da5a68508f0d64a6071e6018babd Mon Sep 17 00:00:00 2001 From: cryptocode <34946442+cryptocode@users.noreply.github.com> Date: Sun, 14 Jan 2018 16:56:54 +0100 Subject: [PATCH] Override clang format for program options --- rai/node/node.cpp | 28 +++++++++++++++++++++++++++- rai/rai_node/entry.cpp | 23 ++++++++++++++++++++++- 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/rai/node/node.cpp b/rai/node/node.cpp index 3ad5ddbe..6a37a1cf 100644 --- a/rai/node/node.cpp +++ b/rai/node/node.cpp @@ -2941,7 +2941,33 @@ void rai::thread_runner::join () void rai::add_node_options (boost::program_options::options_description & description_a) { - description_a.add_options () ("account_create", "Insert next deterministic key in to ") ("account_get", "Get account number for the ") ("account_key", "Get the public key for ") ("vacuum", "Compact database. If data_path is missing, the database in data directory is compacted.") ("data_path", boost::program_options::value (), "Use the supplied path as the data directory") ("diagnostics", "Run internal diagnostics") ("key_create", "Generates a adhoc random keypair and prints it to stdout") ("key_expand", "Derive public key and account number from ") ("wallet_add_adhoc", "Insert in to ") ("wallet_create", "Creates a new wallet and prints the ID") ("wallet_change_seed", "Changes seed for to ") ("wallet_decrypt_unsafe", "Decrypts using , !!THIS WILL PRINT YOUR PRIVATE KEY TO STDOUT!!") ("wallet_destroy", "Destroys and all keys it contains") ("wallet_import", "Imports keys in using in to ") ("wallet_list", "Dumps wallet IDs and public keys") ("wallet_remove", "Remove from ") ("wallet_representative_get", "Prints default representative for ") ("wallet_representative_set", "Set as default representative for ") ("vote_dump", "Dump most recent votes from representatives") ("account", boost::program_options::value (), "Defines for other commands") ("file", boost::program_options::value (), "Defines for other commands") ("key", boost::program_options::value (), "Defines the for other commands, hex") ("password", boost::program_options::value (), "Defines for other commands") ("wallet", boost::program_options::value (), "Defines for other commands"); + // clang-format off + description_a.add_options () + ("account_create", "Insert next deterministic key in to ") + ("account_get", "Get account number for the ") + ("account_key", "Get the public key for ") + ("vacuum", "Compact database. If data_path is missing, the database in data directory is compacted.") + ("data_path", boost::program_options::value (), "Use the supplied path as the data directory") + ("diagnostics", "Run internal diagnostics") + ("key_create", "Generates a adhoc random keypair and prints it to stdout") + ("key_expand", "Derive public key and account number from ") + ("wallet_add_adhoc", "Insert in to ") + ("wallet_create", "Creates a new wallet and prints the ID") + ("wallet_change_seed", "Changes seed for to ") + ("wallet_decrypt_unsafe", "Decrypts using , !!THIS WILL PRINT YOUR PRIVATE KEY TO STDOUT!!") + ("wallet_destroy", "Destroys and all keys it contains") + ("wallet_import", "Imports keys in using in to ") + ("wallet_list", "Dumps wallet IDs and public keys") + ("wallet_remove", "Remove from ") + ("wallet_representative_get", "Prints default representative for ") + ("wallet_representative_set", "Set as default representative for ") + ("vote_dump", "Dump most recent votes from representatives") + ("account", boost::program_options::value (), "Defines for other commands") + ("file", boost::program_options::value (), "Defines for other commands") + ("key", boost::program_options::value (), "Defines the for other commands, hex") + ("password", boost::program_options::value (), "Defines for other commands") + ("wallet", boost::program_options::value (), "Defines for other commands"); + // clang-format on } bool rai::handle_node_options (boost::program_options::variables_map & vm) diff --git a/rai/rai_node/entry.cpp b/rai/rai_node/entry.cpp index 4777c571..16bc23d6 100644 --- a/rai/rai_node/entry.cpp +++ b/rai/rai_node/entry.cpp @@ -111,7 +111,28 @@ int main (int argc, char * const * argv) { boost::program_options::options_description description ("Command line options"); rai::add_node_options (description); - description.add_options () ("help", "Print out options") ("daemon", "Start node daemon") ("debug_block_count", "Display the number of block") ("debug_bootstrap_generate", "Generate bootstrap sequence of blocks") ("debug_dump_representatives", "List representatives and weights") ("debug_frontier_count", "Display the number of accounts") ("debug_mass_activity", "Generates fake debug activity") ("debug_profile_generate", "Profile work generation") ("debug_opencl", "OpenCL work generation") ("debug_profile_verify", "Profile work verification") ("debug_profile_kdf", "Profile kdf function") ("debug_verify_profile", "Profile signature verification") ("debug_profile_sign", "Profile signature generation") ("debug_xorshift_profile", "Profile xorshift algorithms") ("platform", boost::program_options::value (), "Defines the for OpenCL commands") ("device", boost::program_options::value (), "Defines for OpenCL command") ("threads", boost::program_options::value (), "Defines count for OpenCL command"); + + // clang-format off + description.add_options () + ("help", "Print out options") + ("daemon", "Start node daemon") + ("debug_block_count", "Display the number of block") + ("debug_bootstrap_generate", "Generate bootstrap sequence of blocks") + ("debug_dump_representatives", "List representatives and weights") + ("debug_frontier_count", "Display the number of accounts") + ("debug_mass_activity", "Generates fake debug activity") + ("debug_profile_generate", "Profile work generation") + ("debug_opencl", "OpenCL work generation") + ("debug_profile_verify", "Profile work verification") + ("debug_profile_kdf", "Profile kdf function") + ("debug_verify_profile", "Profile signature verification") + ("debug_profile_sign", "Profile signature generation") + ("debug_xorshift_profile", "Profile xorshift algorithms") + ("platform", boost::program_options::value (), "Defines the for OpenCL commands") + ("device", boost::program_options::value (), "Defines for OpenCL command") + ("threads", boost::program_options::value (), "Defines count for OpenCL command"); + // clang-format on + boost::program_options::variables_map vm; boost::program_options::store (boost::program_options::parse_command_line (argc, argv, description), vm); boost::program_options::notify (vm);