Skip to content

Commit 09a4197

Browse files
committed
git push origin fix/ibpp-license-detection-issue-3553 --force
licenses: add IBPP License v1.1 detection - Add ibpp_ref.RULE for reference-style detection - Add ibpp_intro.RULE for header/copyright line detection - Add test data for IBPP interference with passwdqc block Signed-off-by: kumarasantosh <santosh.pulikond02@gmail.com>
1 parent f8d1c47 commit 09a4197

File tree

5 files changed

+73
-0
lines changed

5 files changed

+73
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
license_expression: ibpp
3+
is_license_intro: yes
4+
relevance: 85
5+
---
6+
IBPP License v1.1
7+
-----------------
8+
9+
(C) Copyright 2000-2006 T.I.P. Group S.A. and the IBPP Team (www.ibpp.org)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
license_expression: ibpp
3+
is_license_reference: yes
4+
relevance: 90
5+
---
6+
IBPP License, see appendix
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
passwdqc
2+
Copyright (c) 2000-2002 by Solar Designer
3+
Copyright (c) 2008,2009 by Dmitry V. Levin
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted.
6+
7+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
8+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10+
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
11+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
12+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
13+
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
15+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
16+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
17+
SUCH DAMAGE.
18+
19+
| IBPP | Wt::Dbo Firebird backend | IBPP License, see appendix | Copyright 2000-2006 T.I.P. Group S.A. and the IBPP Team |
20+
21+
### IBPP
22+
23+
IBPP License v1.1
24+
-----------------
25+
26+
(C) Copyright 2000-2006 T.I.P. Group S.A. and the IBPP Team (www.ibpp.org)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
notes: Minimal Wt-derived regression fixture for issue #3553, keeping the passwdqc disclaimer immediately before the IBPP reference and appendix intro.
2+
license_expressions:
3+
- bsd-1-clause
4+
- ibpp
5+
- ibpp

tests/licensedcode/test_plugin_license_detection.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,3 +374,30 @@ def test_match_reference_license():
374374
must_exist=False,
375375
)
376376
check_json_scan(expected_loc, result_file, regen=REGEN_TEST_FIXTURES)
377+
378+
379+
def test_wt_ibpp_interference_is_detected_in_scan_output():
380+
test_file = test_env.get_test_loc('datadriven/lic1/wt_ibpp_interference.md')
381+
result_file = test_env.get_temp_file('json')
382+
args = [
383+
'--license',
384+
'--license-text',
385+
'--license-text-diagnostics',
386+
'--license-diagnostics',
387+
'--strip-root',
388+
'--json', result_file,
389+
test_file,
390+
]
391+
run_scan_click(args, processes='1')
392+
393+
from commoncode.resource import VirtualCodebase
394+
395+
codebase = VirtualCodebase(result_file)
396+
resource = codebase.get_resource(path='wt_ibpp_interference.md')
397+
398+
assert resource.detected_license_expression == 'bsd-1-clause AND ibpp'
399+
assert any(
400+
match['license_expression'] == 'ibpp'
401+
for detection in resource.license_detections
402+
for match in detection['matches']
403+
)

0 commit comments

Comments
 (0)