32 static constexpr const char* TEMPLATE_EMPTY_FUNCTION =
33 "There is no functions that resembles the "
34 "name: {pattern:function}\n"
35 "Value incorrected passed or there is no "
36 "duplication code with this function";
37 static constexpr const char* TEMPLATE_COUNT =
38 "The total number of functions that are "
39 "similar to the found one is {count}. "
40 "More info about them are listed below.";
41 static constexpr const char* REFERENCE_PATH_MESSAGE =
"The following function was found:";
44 std::string function_pattern;
53 void find_path_that_meets_pattern();
58 void print_empty_path_message()
const;
69 void print_reference_path();
75 void print_similar_functions(
const std::vector<Path>& similar_paths);
80 void print_similar_functions();
82 void handle_show_mode();
86 {
"function_name", 0,
PositionalArgument,
"The tool will match the parameter with any function that has the `FUNCTION_NAME` as a substring."},
87 {
"open",
'o',
NoArgument,
"Open the folder where the function is located."},
88 {
"show",
's',
NoArgument,
"Show detailed information and the full source code of the function."},
89 {
"no-numbers", 0,
NoArgument,
"Hide line numbers in the displayed source code."},
const CliOption * options() const final
Represents a code function with its content and metadata.
Path manipulation class for tool-specific directory structure.
Similar function locator and reporter.
static constexpr CliOption options_[]
bool validate(const ParsedOptions &options) override
Validate the arguments already analyzed.
bool run(const ParsedOptions &options) override
Handles similar function finding command.
Represents a similarity graph between functions (paths).
#define COMMAND_DESCRIPTION(str)
Function abstraction for temporary codebase.
#define OPTION_END
This marks the end of a long array of options.
Path abstraction for temporary codebase.
Similarity relationships storage and analysis.
Defines utility functions used across all files.