Arkanjo 0.1
A tool for find code duplicated functions in codebases
|
A simple Python3 tool to detect similarities between files within a repository. More...
Go to the source code of this file.
Classes | |
class | duplicate_code_detection.ReturnCode |
Enumeration of possible return codes for the application. More... | |
class | duplicate_code_detection.CliColors |
ANSI color codes for terminal text formatting. More... | |
Namespaces | |
namespace | duplicate_code_detection |
Functions | |
duplicate_code_detection.get_all_source_code_from_directory (directory, file_extensions) | |
Get a list with all the source code files within the directory. | |
duplicate_code_detection.conditional_print (text, machine_friendly_output) | |
str | duplicate_code_detection.remove_comments_and_docstrings (str source_code) |
Strip comments and docstrings from source code. | |
duplicate_code_detection.get_loc_count (file_path) | |
duplicate_code_detection.get_loc_to_print (loc_count) | |
duplicate_code_detection.main () | |
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) | |
Variables | |
list | duplicate_code_detection.source_code_file_extensions = ["h", "c", "cpp", "cc", "java", "py", "cs"] |
str | duplicate_code_detection.file_column_label = "File" |
str | duplicate_code_detection.file_loc_label = ",#LoC" |
str | duplicate_code_detection.similarity_column_label = "Similarity (%)" |
duplicate_code_detection.similarity_label_length = len(similarity_column_label) | |
str | duplicate_code_detection.loc_label = "#LoC" |
str | duplicate_code_detection.similarity_label = "Similarity" |
duplicate_code_detection.exit_code | |
duplicate_code_detection._ | |
A simple Python3 tool to detect similarities between files within a repository.
Document similarity code adapted from Jonathan Mugan's tutorial: https://www.oreilly.com/learning/how-do-i-compare-document-similarity-using-python
Definition in file duplicate_code_detection.py.