Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ typecode-libmagic
fosslight_util>=1.4.0
PyYAML
wheel
packaging<=21.3
7 changes: 5 additions & 2 deletions src/fosslight_source/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def main():
scanned_result = []
license_list = []
time_out = 120
core = -1

parser = argparse.ArgumentParser(description='FOSSLight Source', prog='fosslight_source', add_help=False)
parser.add_argument('-h', '--help', action='store_true', required=False)
Expand All @@ -62,6 +63,7 @@ def main():
parser.add_argument('-f', '--format', nargs=1, type=str, required=False)
parser.add_argument('-s', '--scanner', nargs=1, type=str, required=False, default='all')
parser.add_argument('-t', '--timeout', type=int, required=False, default=120)
parser.add_argument('-c', '--cores', type=int, required=False, default=-1)

args = parser.parse_args()

Expand All @@ -84,6 +86,7 @@ def main():
selected_scanner = ''.join(args.scanner)

time_out = args.timeout
core = args.cores

timer = TimerThread()
timer.setDaemon(True)
Expand All @@ -103,14 +106,14 @@ def main():
if os.path.isdir(path_to_scan):
if selected_scanner == 'scancode':
success, _result_log["Scan Result"], scanned_result, license_list = run_scan(path_to_scan, output_file_name,
write_json_file, -1, True,
write_json_file, core, True,
print_matched_text, format, True,
time_out)
elif selected_scanner == 'scanoss':
scanned_result = run_scanoss_py(path_to_scan, output_file_name, format, True, write_json_file)
elif selected_scanner == 'all' or selected_scanner == '':
success, _result_log["Scan Result"], scanned_result, license_list = run_all_scanners(path_to_scan, output_file_name,
write_json_file, -1,
write_json_file, core,
print_matched_text, format, True,
time_out)
else:
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ skipdist = true

[testenv]
install_command = pip install {opts} {packages}
whitelist_externals =
allowlist_externals =
cat
rm
ls
Expand Down