Skip to content

Commit ec3638a

Browse files
committed
Fix crashes when supplying only directories
1 parent 6272a6c commit ec3638a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

duplicate_code_detection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ def main():
6767
help="Check for similarities between all files of the specified directories.")
6868
group.add_argument('-f', "--files", nargs="+", help="Check for similarities between specified files. \
6969
The more files are supplied the more accurate are the results.")
70-
parser.add_argument("--ignore-directories", nargs="+",
70+
parser.add_argument("--ignore-directories", nargs="+", default=list(),
7171
help="Directories to ignore.")
7272
parser.add_argument("--ignore-files", nargs="+", help="Files to ignore.")
7373
parser.add_argument("-j", "--json", type=bool,
7474
default=False, help="Print output as JSON.")
75-
parser.add_argument("--project-root-dir", type=str,
75+
parser.add_argument("--project-root-dir", type=str, default=str(),
7676
help="The relative path to the project root directory to be removed when printing out results.")
7777
parser.add_argument("--file-extensions", nargs="+", default=source_code_file_extensions,
7878
help="File extensions to check for similarities.")

0 commit comments

Comments
 (0)