Skip to content
Merged
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
15 changes: 2 additions & 13 deletions src/fosslight_scanner/fosslight_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
_executed_path = ""
SRC_DIR_FROM_LINK_PREFIX = "fosslight_src_dir_"
SCANNER_MODE = [
"all", "compare", "reuse", "prechecker", "binary",
"all", "compare", "binary",
"bin", "src", "source", "dependency", "dep"
]

Expand Down Expand Up @@ -183,12 +183,6 @@ def run_scanner(src_path, dep_arguments, output_path, keep_raw_data=False,
abs_path = os.path.abspath(src_path)

if success:
if run_prechecker:
success, result = call_analysis_api(src_path, "Prechecker Lint",
-1, prechecker_lint,
abs_path, False, _output_dir,
exclude_path=path_to_exclude)

if run_src:
try:
if fosslight_source_installed:
Expand Down Expand Up @@ -446,20 +440,15 @@ def run_main(mode_list, path_arg, dep_arguments, output_file_or_dir, file_format
run_src = True
run_bin = True
run_dep = True
run_prechecker = False
if "prechecker" in mode_list or "reuse" in mode_list:
run_prechecker = True
else:
if "prechecker" in mode_list or "reuse" in mode_list:
run_prechecker = True
if "binary" in mode_list or "bin" in mode_list:
run_bin = True
if "source" in mode_list or "src" in mode_list:
run_src = True
if "dependency" in mode_list or "dep" in mode_list:
run_dep = True

if run_dep or run_src or run_bin or run_prechecker:
if run_dep or run_src or run_bin:
if src_path == "" and url_to_analyze == "":
src_path, dep_arguments, url_to_analyze = get_input_mode(_executed_path, mode_list)

Expand Down