Skip to content

Commit

Permalink
Update tox
Browse files Browse the repository at this point in the history
Signed-off-by: jiyeong.seok <jiyeong.seok@lge.com>
  • Loading branch information
dd-jy committed Sep 6, 2024
1 parent 3e2e761 commit 0921181
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 12 deletions.
3 changes: 2 additions & 1 deletion src/fosslight_source/_scan_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ def set_oss_item(self):
def get_print_array(self):
print_rows = []
for item in self.oss_items:
print_rows.append([self.source_name_or_path, item.name, item.version, ",".join(item.license), item.download_location, "",
print_rows.append([self.source_name_or_path, item.name, item.version, ",".join(item.license),
item.download_location, "",
item.copyright, "Exclude" if self.exclude else "", item.comment,
self.license_reference])
return print_rows
Expand Down
6 changes: 3 additions & 3 deletions src/fosslight_source/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def merge_results(scancode_result=[], scanoss_result=[], spdx_downloads={}):
new_result_item = SourceItem(file_name)
new_result_item.download_location = download_location
scancode_result.append(new_result_item)

for item in scancode_result:
item.set_oss_item()

Expand Down Expand Up @@ -307,8 +307,8 @@ def run_scanners(path_to_scan, output_file_name="", write_json_file=False, num_c
spdx_downloads = get_spdx_downloads(path_to_scan, path_to_exclude)
merged_result = merge_results(scancode_result, scanoss_result, spdx_downloads)
scan_item = create_report_file(start_time, merged_result, license_list, scanoss_result, selected_scanner,
print_matched_text, output_path, output_files, output_extensions, correct_mode,
correct_filepath, path_to_scan, path_to_exclude)
print_matched_text, output_path, output_files, output_extensions, correct_mode,
correct_filepath, path_to_scan, path_to_exclude)
else:
print_help_msg_source_scanner()
result_log[RESULT_KEY] = "Unsupported scanner"
Expand Down
1 change: 0 additions & 1 deletion src/fosslight_source/run_scancode.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from fosslight_util.set_log import init_log
from ._parsing_scancode_file_item import parsing_file_item
from ._parsing_scancode_file_item import get_error_from_header
from ._license_matched import get_license_list_to_print
from fosslight_util.output_format import check_output_formats
from fosslight_binary.binary_analysis import check_binary

Expand Down
4 changes: 2 additions & 2 deletions tests/cli_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ def main():
if len(ret) > 2:
try:
for scan_item in ret[2]:
logger.warning(scan_item.get_row_to_print())
logger.warning(scan_item.get_print_array())
except Exception as ex:
logger.error("Error:"+str(ex))
if ret_scanoss:
for scan_item in ret_scanoss:
logger.warning(scan_item.get_row_to_print())
logger.warning(scan_item.get_print_array())


if __name__ == '__main__':
Expand Down
5 changes: 0 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ commands =

python tests/cli_test.py
pytest -v --flake8

pip install fosslight_scanner
pip install fosslight_android
fosslight -v
fosslight_android -v

[testenv:flake8]
deps = flake8
Expand Down

0 comments on commit 0921181

Please sign in to comment.