From e2a7390064cb673c2e4f9b380eb7edb211fffce4 Mon Sep 17 00:00:00 2001 From: Chris Punches Date: Tue, 11 Mar 2025 01:08:55 -0400 Subject: [PATCH] cleanup from last --- modules/build/include/commands.hpp | 14 +++++++++++++- modules/build/include/helpers.hpp | 21 --------------------- modules/build/src/cli_parsers.cpp | 3 --- modules/build/src/commands.cpp | 6 ------ modules/build/src/helpers.cpp | 3 --- 5 files changed, 13 insertions(+), 34 deletions(-) diff --git a/modules/build/include/commands.hpp b/modules/build/include/commands.hpp index 8435a00..fc5aaa0 100644 --- a/modules/build/include/commands.hpp +++ b/modules/build/include/commands.hpp @@ -24,4 +24,16 @@ int cmd_create(int argc, char** argv); * @param argv Array of arguments * @return 0 on success, non-zero on failure */ -int cmd_help(int argc, char** argv); \ No newline at end of file +int cmd_help(int argc, char** argv); + +/** + * @brief Handler for unknown commands + * + * Displays an error message for unrecognized commands. + * + * @param command The unrecognized command string + * @param argc Number of arguments + * @param argv Array of arguments + * @return 1 to indicate failure + */ +int cmd_unknown(const char* command, int argc, char** argv); diff --git a/modules/build/include/helpers.hpp b/modules/build/include/helpers.hpp index e31f35c..ce59f68 100644 --- a/modules/build/include/helpers.hpp +++ b/modules/build/include/helpers.hpp @@ -31,26 +31,5 @@ */ std::string expand_path(const std::string& path); -/** - * @brief Handler for the help command - * - * Displays information about available commands in the build module. - * - * @param argc Number of arguments - * @param argv Array of arguments - * @return 0 on success, non-zero on failure - */ -int cmd_help(int argc, char** argv); -/** - * @brief Handler for unknown commands - * - * Displays an error message for unrecognized commands. - * - * @param command The unrecognized command string - * @param argc Number of arguments - * @param argv Array of arguments - * @return 1 to indicate failure - */ -int cmd_unknown(const char* command, int argc, char** argv); diff --git a/modules/build/src/cli_parsers.cpp b/modules/build/src/cli_parsers.cpp index e717827..1672028 100644 --- a/modules/build/src/cli_parsers.cpp +++ b/modules/build/src/cli_parsers.cpp @@ -145,9 +145,6 @@ Command parse_command(const char* cmd_str) { return CMD_UNKNOWN; } -/** - * @brief Validates the build options - */ int validate_build_options(const BuildOptions& options) { // Check if contents directory is provided and exists if (options.contents_dir.empty()) { diff --git a/modules/build/src/commands.cpp b/modules/build/src/commands.cpp index 83be705..1782a89 100644 --- a/modules/build/src/commands.cpp +++ b/modules/build/src/commands.cpp @@ -52,9 +52,6 @@ int cmd_create(int argc, char** argv) { return 0; } -/** - * @brief Handler for the help command - */ int cmd_help(int argc, char** argv) { dpm_log(LOG_INFO, "DPM Build Module - Creates DPM packages according to specification"); dpm_log(LOG_INFO, "Available commands:"); @@ -75,9 +72,6 @@ int cmd_help(int argc, char** argv) { return 0; } -/** - * @brief Handler for unknown commands - */ int cmd_unknown(const char* command, int argc, char** argv) { std::string msg = "Unknown command: "; msg += (command ? command : ""); diff --git a/modules/build/src/helpers.cpp b/modules/build/src/helpers.cpp index 0a0f59a..ac00654 100644 --- a/modules/build/src/helpers.cpp +++ b/modules/build/src/helpers.cpp @@ -13,9 +13,6 @@ #include "helpers.hpp" -/** - * @brief Expands environment variables and tildes in a path - */ std::string expand_path(const std::string& path) { wordexp_t exp_result; std::string expanded_path = path;