[licensecheck] 94/112: Fix tighten license pattern curl (was misdetecting other MIT variants).
Jonas Smedegaard
dr at jones.dk
Fri Nov 25 22:02:58 UTC 2016
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository licensecheck.
commit 4bc03c3cae20e5d3be3bd25e560632fbc5d7e004
Author: Jonas Smedegaard <dr at jones.dk>
Date: Fri Nov 25 13:27:57 2016 +0100
Fix tighten license pattern curl (was misdetecting other MIT variants).
---
lib/Regexp/Pattern/License.pm | 3 +--
lib/Regexp/Pattern/License/Parts.pm | 7 +++++++
t/fedora.t | 2 +-
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/lib/Regexp/Pattern/License.pm b/lib/Regexp/Pattern/License.pm
index 4a85654..3e61cfb 100644
--- a/lib/Regexp/Pattern/License.pm
+++ b/lib/Regexp/Pattern/License.pm
@@ -374,8 +374,7 @@ our %RE = (
},
curl => {
tags => ['mit'],
- pat =>
- qr/Permission to use, copy, modify, and distribute this software for/,
+ pat => qr/$P{note_cpyr_perm}\.\s+$P{asis_sw_warranty}/,
},
dsdp => {
name => 'DSDP',
diff --git a/lib/Regexp/Pattern/License/Parts.pm b/lib/Regexp/Pattern/License/Parts.pm
index 7ad87ae..21dc6bb 100644
--- a/lib/Regexp/Pattern/License/Parts.pm
+++ b/lib/Regexp/Pattern/License/Parts.pm
@@ -47,6 +47,8 @@ Patterns each covering a single part, e.g. a clause or a disclaimer phrase.
=item * asis_sw_name_discl
+=item * asis_sw_warranty
+
=item * cc
=item * cc_by
@@ -202,6 +204,11 @@ our %RE = (
tags => ['clause'],
pat => qr/THE SOFTWARE IS PROVIDED \W*AS\W+IS\W*(?:,?|AND) (?:\S+ ){1,15}DISCLAIMS/,
},
+ asis_sw_warranty => {
+ caption => 'as-is (software, warranty)',
+ tags => ['clause'],
+ pat => qr/THE SOFTWARE IS PROVIDED \W*AS\W+IS\W* WITHOUT WARRANTY/,
+ },
cc => {
caption => 'Creative Commons qualifier',
tags => ['qualifier'],
diff --git a/t/fedora.t b/t/fedora.t
index 552af53..a5f462a 100644
--- a/t/fedora.t
+++ b/t/fedora.t
@@ -27,7 +27,7 @@ test "Parse corpus" => sub {
run_me(
{ license =>
- 'MIT~oldstyle and/or DSDP and/or curl and/or MIT~oldstyle~disclaimer and/or Expat and/or Adobe-Glyph and/or BSL and/or PostgreSQL',
+ 'MIT~oldstyle and/or DSDP and/or MIT~oldstyle~disclaimer and/or Expat and/or Adobe-Glyph and/or BSL and/or PostgreSQL',
corpus => 'MIT'
}
);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/licensecheck.git
More information about the Pkg-perl-cvs-commits
mailing list