Skip to content

Commit 0806e1b

Browse files
committed
scancode: add more information for offenders - filename + licenses found
1 parent 4a6e9d7 commit 0806e1b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: tools/test/travis-ci/scancode.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ def license_check(directory_name, file):
4141
if file['type'] == 'directory':
4242
continue
4343
if not file['licenses']:
44-
offenders.append(file['path'])
44+
offenders.append(file)
4545
for i in range(len(file['licenses'])):
4646
if (not file['licenses'][i]['spdx_license_key'] or (file['licenses'][i]['category'] != 'Permissive')):
47-
offenders.append(file['path'])
47+
offenders.append(file)
4848

4949
if offenders:
5050
print("Found files with missing license details, please review and fix")
5151
for offender in offenders:
52-
print(offender[len(directory_name):])
52+
print("File: ", offender['path'][len(directory_name):], ":", "licenses found: ", offender['licenses'])
5353
sys.exit(-1)
5454
else:
5555
sys.exit(0)

0 commit comments

Comments
 (0)