Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/licensedcode/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2015 nexB Inc. and others. All rights reserved.
# Copyright (c) 2016 nexB Inc. and others. All rights reserved.
# http://nexb.com and https://github.com/nexB/scancode-toolkit/
# The ScanCode software is licensed under the Apache License version 2.0.
# Data generated with ScanCode require an acknowledgment.
Expand Down Expand Up @@ -52,9 +52,6 @@
MIN_MATCH_LENGTH = 4
MIN_MATCH_HIGH_LENGTH = 3

# maximum number of non-matching tokens that can be skipped
MAX_GAP_SKIP = 15

# maximum distance between two matches to merge
MAX_DIST = 120

Expand Down
3 changes: 1 addition & 2 deletions src/licensedcode/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@ def get(self, query_run):

qrs = query_run.start
qre = query_run.end
qlbp = query_run.line_by_pos
return [lm.rebase(qrs, qre, qlbp, MATCH_CACHE) for lm in cached]
return [lm.rebase(qrs, qre, MATCH_CACHE) for lm in cached]

def put(self, query_run, matches):
"""
Expand Down
7 changes: 7 additions & 0 deletions src/licensedcode/data/licenses/day-spec.LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
[Day Specification License]

Day Management AG ("Licensor") is willing to license this specification
to you ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED
IN THIS LICENSE AGREEMENT ("Agreement"). Please read the terms and
conditions of this Agreement carefully.

Content Repository for JavaTM Technology API Specification ("Specification")
Version: 1.0
Status: FCS
Expand Down
6 changes: 0 additions & 6 deletions src/licensedcode/data/licenses/tatu-ylonen.LICENSE
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
Tatu Ylonen License

* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
* All rights reserved
* Versions of malloc and friends that check their results, and never return
* failure (they call fatal if they encounter an error).
*
* As far as I am concerned, the code I have written for this software
* can be used freely for any purpose. Any derived versions of this
* software must be clearly marked as such, and if the derived work is
Expand Down
20 changes: 0 additions & 20 deletions src/licensedcode/data/licenses/zlib.SPDX

This file was deleted.

2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/3pp-proprietary-08_3.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- 3pp-proprietary-08
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/adobe-scl_2.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- adobe-scl
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/afl-2.1_or_bsd-new_4.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
licenses:
- afl-2.1
- bsd-new
solid: yes
minimum_score: 100
license_choice: yes
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/apache-1.1_31.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
licenses:
- apache-1.1
solid: yes
minimum_score: 100
notes: >
Notice found in http://apache.org/licenses/LICENSE-1.1
but it is really specific to an Apache Software Foundation component.
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/apache-1.1_36.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
licenses:
- apache-1.1
solid: yes
minimum_score: 100
notes: Old, original Apache 1.1 URL
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/apache-1.1_49.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- apache-1.1
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/apache-2.0_10.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- apache-2.0
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/apache-2.0_35.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- apache-2.0
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/apache-2.0_39.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- apache-2.0
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/apache-2.0_51.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- apache-2.0
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/apache.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- apache-2.0
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/apache_3.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- apache-2.0
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/bitzi-pd.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- bitzi-pd
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/boost-original.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- boost-original
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/bsd-2-clause-freebsd_5.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
licenses:
- bsd-2-clause-freebsd

solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/bsd-new_106.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- bsd-new
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/bsd-new_108.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- bsd-new
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/bsd-new_109.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- bsd-new
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/bsd-new_111.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- bsd-new
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/bsd-new_116.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- bsd-new
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/bsd-new_119.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- bsd-new
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/bsd-new_or_gpl-2.0_3.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
licenses:
- bsd-new
- gpl-2.0
solid: yes
minimum_score: 100
license: bsd-new or gpl-2.0
license_choice: yes
notes: LKM with Dual BSD/GPL
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/bsd-new_or_gpl-2.0_4.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
licenses:
- bsd-new
- gpl-2.0
solid: yes
minimum_score: 100
license: bsd-new or gpl-2.0
license_choice: yes
notes: LKM with Dual BSD/GPL
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/bsd-new_zlib.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
licenses:
- bsd-new
solid: yes
minimum_score: 100

2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/bsd-original-uc_6.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- bsd-original-uc
solid: yes
minimum_score: 100
1 change: 0 additions & 1 deletion src/licensedcode/data/rules/false_positive14.RULE

This file was deleted.

2 changes: 0 additions & 2 deletions src/licensedcode/data/rules/false_positive14.yml

This file was deleted.

2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/gfdl-1.1_14.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- gfdl-1.1
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/gpl-2.0-plus_67.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- gpl-2.0-plus
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/gpl-2.0-plus_74.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- gpl-2.0-plus
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/gpl-2.0-plus_75.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- gpl-2.0-plus
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/gpl-2.0-plus_77.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- gpl-2.0-plus
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/gpl-2.0_37.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- gpl-2.0
solid: yes
minimum_score: 100
3 changes: 1 addition & 2 deletions src/licensedcode/data/rules/gpl-2.0_39.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
licenses:
- gpl-2.0
solid: yes

minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/gpl-2.0_43.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
licenses:
- gpl-2.0
notes: MODULE_LICENSE in LKMs. FIXME this should be a plain GPL no version
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/gpl-2.0_83.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
licenses:
- gpl-2.0
notes: Lizartech gpl notice, rather complex
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/gpl-2.0_86.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- gpl-2.0
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/gpl-3.0_1.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- gpl-3.0
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/gpl-3.0_19.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- gpl-3.0
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/gpl-3.0_22.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
licenses:
- gpl-3.0
solid: yes
minimum_score: 100

2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/gpl-3.0_24.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- gpl-3.0
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/gpl.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
licenses:
- gpl
solid: yes
minimum_score: 100

2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/gpl_42.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- gpl
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/gpl_63.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
licenses:
- gpl
solid: yes
minimum_score: 100
notes: No version gpl declaration
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/gpl_73.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- gpl
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/gpl_78.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- gpl
solid:
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/ietf-trust.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- ietf-trust
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/ietf-trust_3.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- ietf-trust
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/ijg_1.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- ijg
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/ijg_2.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- ijg
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/indiana-extreme.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- indiana-extreme
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/lgpl-2.0_10.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- lgpl-2.0
solid: yes
minimum_score: 100
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/lgpl-2.1-plus_26.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
licenses:
- lgpl-2.1
solid: yes
minimum_score: 100
notes: http://creativecommons.org/licenses/LGPL/2.1/
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/lgpl-2.1_15.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
licenses:
- lgpl-2.1
solid: yes
minimum_score: 100
notes: TinyMCE license url
2 changes: 1 addition & 1 deletion src/licensedcode/data/rules/lgpl-2.1_36.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
licenses:
- lgpl-2.1
solid: yes
minimum_score: 100
Loading