Arkanjo 0.1
A tool for find code duplicated functions in codebases
|
Classes | |
class | CliColors |
ANSI color codes for terminal text formatting. More... | |
class | ReturnCode |
Enumeration of possible return codes for the application. More... | |
Functions | |
get_all_source_code_from_directory (directory, file_extensions) | |
Get a list with all the source code files within the directory. | |
conditional_print (text, machine_friendly_output) | |
str | remove_comments_and_docstrings (str source_code) |
Strip comments and docstrings from source code. | |
get_loc_count (file_path) | |
get_loc_to_print (loc_count) | |
main () | |
run (fail_threshold, directories, files, ignore_directories, ignore_files, json_output, project_root_dir, file_extensions, ignore_threshold, only_code, csv_output, show_loc) | |
Variables | |
list | source_code_file_extensions = ["h", "c", "cpp", "cc", "java", "py", "cs"] |
str | file_column_label = "File" |
str | file_loc_label = ",#LoC" |
str | similarity_column_label = "Similarity (%)" |
similarity_label_length = len(similarity_column_label) | |
str | loc_label = "#LoC" |
str | similarity_label = "Similarity" |
exit_code | |
_ | |
duplicate_code_detection.conditional_print | ( | text, | |
machine_friendly_output ) |
text | |
machine_friendly_output |
Definition at line 80 of file duplicate_code_detection.py.
duplicate_code_detection.get_all_source_code_from_directory | ( | directory, | |
file_extensions ) |
Get a list with all the source code files within the directory.
directory | |
file_extensions |
Definition at line 62 of file duplicate_code_detection.py.
duplicate_code_detection.get_loc_count | ( | file_path | ) |
duplicate_code_detection.get_loc_to_print | ( | loc_count | ) |
loc_count |
Definition at line 137 of file duplicate_code_detection.py.
duplicate_code_detection.main | ( | ) |
Definition at line 147 of file duplicate_code_detection.py.
str duplicate_code_detection.remove_comments_and_docstrings | ( | str | source_code | ) |
Strip comments and docstrings from source code.
source_code | Raw source code as a single string |
Definition at line 90 of file duplicate_code_detection.py.
duplicate_code_detection.run | ( | fail_threshold, | |
directories, | |||
files, | |||
ignore_directories, | |||
ignore_files, | |||
json_output, | |||
project_root_dir, | |||
file_extensions, | |||
ignore_threshold, | |||
only_code, | |||
csv_output, | |||
show_loc ) |
fail_threshold | |
directories | |
files | |
ignore_directories | |
ignore_files | |
json_output | |
project_root_dir | |
file_extensions | |
ignore_threshold | |
only_code | |
csv_output | |
show_loc |
Definition at line 241 of file duplicate_code_detection.py.
|
protected |
Definition at line 483 of file duplicate_code_detection.py.
duplicate_code_detection.exit_code |
Definition at line 483 of file duplicate_code_detection.py.
str duplicate_code_detection.file_column_label = "File" |
Definition at line 24 of file duplicate_code_detection.py.
str duplicate_code_detection.file_loc_label = ",#LoC" |
Definition at line 25 of file duplicate_code_detection.py.
str duplicate_code_detection.loc_label = "#LoC" |
Definition at line 28 of file duplicate_code_detection.py.
str duplicate_code_detection.similarity_column_label = "Similarity (%)" |
Definition at line 26 of file duplicate_code_detection.py.
str duplicate_code_detection.similarity_label = "Similarity" |
Definition at line 29 of file duplicate_code_detection.py.
duplicate_code_detection.similarity_label_length = len(similarity_column_label) |
Definition at line 27 of file duplicate_code_detection.py.
list duplicate_code_detection.source_code_file_extensions = ["h", "c", "cpp", "cc", "java", "py", "cs"] |
Definition at line 23 of file duplicate_code_detection.py.