File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
tests/packagedcode/data/license_detection/reference-to-package Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -1382,7 +1382,7 @@ def has_references_to_local_files(license_matches):
1382
1382
Return True if any of the matched Rule for the ``license_matches`` has a
1383
1383
non empty `referenced_filenames`, otherwise return False.
1384
1384
"""
1385
- return any (
1385
+ return not has_extra_words ( license_matches ) and any (
1386
1386
bool (match .rule .referenced_filenames )
1387
1387
for match in license_matches
1388
1388
)
Original file line number Diff line number Diff line change 725
725
"license_expression" : " apache-2.0" ,
726
726
"license_expression_spdx" : " Apache-2.0" ,
727
727
"detection_count" : 2 ,
728
- "detection_log" : [],
728
+ "detection_log" : [
729
+ " extra-words"
730
+ ],
729
731
"reference_matches" : [
730
732
{
731
733
"license_expression" : " apache-2.0" ,
1024
1026
"matched_text_diagnostics" : " License\n\n [PaddleNLP] is provided under the [Apache-2.0 License](./LICENSE)."
1025
1027
}
1026
1028
],
1027
- "detection_log" : [],
1029
+ "detection_log" : [
1030
+ " extra-words"
1031
+ ],
1028
1032
"identifier" : " apache_2_0-4571361c-d5af-4e7e-c015-6cc10c1b8174"
1029
1033
}
1030
1034
],
1577
1581
"matched_text_diagnostics" : " License\n\n [PaddleNLP] is provided under the [Apache-2.0 License](./LICENSE)."
1578
1582
}
1579
1583
],
1580
- "detection_log" : [],
1584
+ "detection_log" : [
1585
+ " extra-words"
1586
+ ],
1581
1587
"identifier" : " apache_2_0-4571361c-d5af-4e7e-c015-6cc10c1b8174"
1582
1588
}
1583
1589
],
You can’t perform that action at this time.
0 commit comments