31 static constexpr const char* TEMPLATE_EMPTY_FUNCTION =
32 "There is no functions that resembles the "
33 "name: {pattern:function}\n"
34 "Value incorrected passed or there is no "
35 "duplication code with this function";
36 static constexpr const char* TEMPLATE_COUNT =
37 "The total number of functions that are "
38 "similar to the found one is {count}. "
39 "More info about them are listed below.";
40 static constexpr const char* REFERENCE_PATH_MESSAGE =
"The following function was found:";
43 std::string function_pattern;
52 void find_path_that_meets_pattern();
57 void print_empty_path_message()
const;
68 void print_reference_path();
74 void print_similar_functions(
const std::vector<Path>& similar_paths);
79 void print_similar_functions();
81 void handle_show_mode();
85 {
"function_name", 0,
PositionalArgument,
"The tool will match the parameter with any function that has the `FUNCTION_NAME` as a substring."},
86 {
"open",
'o',
NoArgument,
"Open the folder where the function is located."},
87 {
"show",
's',
NoArgument,
"Show detailed information and the full source code of the function."},
88 {
"no-numbers", 0,
NoArgument,
"Hide line numbers in the displayed source code."},
const CliOption * options() const final
Represents a function extracted from a codebase.
Represents a logical path to a function in the codebase.
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 representation for a codebase.
#define OPTION_END
This marks the end of a long array of options.
Logical path abstraction for source code elements.
Similarity relationships storage and analysis.