Skip to content

Commit 730758f

Browse files
Sort the result by file and exclude attributes
1 parent 176c76f commit 730758f

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/fosslight_source/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def create_report_file(_start_time, scanned_result, license_list, selected_scann
170170
output_file = f"fosslight_report_src_{_start_time}"
171171

172172
if scanned_result:
173-
scanned_result = sorted(scanned_result, key=lambda row: (''.join(row.licenses)))
173+
scanned_result = sorted(scanned_result, key=lambda row: (row.exclude, row.file))
174174

175175
if selected_scanner == 'scancode' or output_extension == _json_ext:
176176
sheet_list[SCANOSS_SHEET_NAME] = [scan_item.get_row_to_print() for scan_item in scanned_result]

tests/test_files/test/temp.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* SPDX-FileCopyrightText: Copyright 2022 LG Electronics Inc.
3+
* SPDX-License-Identifier: Apache-2.0
4+
* DownloadLocation: https://github.com/browserify/acorn-node
5+
*/
6+
#include <iostream>
7+
8+
int main()
9+
{
10+
std::cout << "Hello, world!" << std::endl;
11+
return 0;
12+
}

0 commit comments

Comments
 (0)