[lintian] 02/06: Add empty-short-license-in-dep5-copyright tag
This is an automated email from the git hooks/post-receive script.
broucaries-guest pushed a commit to branch master
in repository lintian.
commit 558f3af5ed0b684575416f83f932ffbdf4c8da4e
Author: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
Date: Thu Jul 17 23:34:40 2014 +0200
Add empty-short-license-in-dep5-copyright tag
If short license if empty tag it by using a specific tag.
Signed-off-by: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
---
checks/source-copyright.desc | 10 ++++++++--
checks/source-copyright.pm | 13 +++++--------
t/tests/source-copyright-empty-field/tags | 8 ++++----
3 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/checks/source-copyright.desc b/checks/source-copyright.desc
index ee2a468..916fb16 100644
--- a/checks/source-copyright.desc
+++ b/checks/source-copyright.desc
@@ -115,8 +115,14 @@ Certainty: possible
Ref: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Info: The paragraph in the machine readable copyright file is missing a field
that is required by the specification.
- .
- This warning could also be raised by an empty required field.
+
+Tag: empty-short-license-in-dep5-copyright
+Severity: normal
+Certainty: possible
+Ref: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Info: The short license field in the machine readable copyright file
+ is empty.
+
Tag: missing-license-paragraph-in-dep5-copyright
Severity: normal
diff --git a/checks/source-copyright.pm b/checks/source-copyright.pm
index b7117f1..adbd211 100644
--- a/checks/source-copyright.pm
+++ b/checks/source-copyright.pm
@@ -234,8 +234,7 @@ sub _parse_dep5 {
if (defined($first_para->{'license'})) {
my $license = $first_para->{'license'};
if ($license =~ m/\A\s*(\n|\Z)/xms) {
- tag 'missing-field-in-dep5-copyright', 'license',
- '(empty short license header paragraph)';
+ tag 'empty-short-license-in-dep5-copyright','(header paragraph)';
} else {
for my $license (split_licenses($first_para->{'license'})) {
$required_standalone_licenses{$license} = 1;
@@ -268,9 +267,8 @@ sub _parse_dep5 {
tag 'missing-license-text-in-dep5-copyright', lc $license,
"(paragraph at line $lines[$i]{'START-OF-PARAGRAPH'})";
} elsif ($license =~ m/\A\s*\n/xms) {
- tag 'missing-field-in-dep5-copyright', 'license',
- '(empty short license,',
- "paragraph at line $lines[$i]{'START-OF-PARAGRAPH'})";
+ tag 'empty-short-license-in-dep5-copyright',
+ "(paragraph at line $lines[$i]{'START-OF-PARAGRAPH'})";
} else {
($license, undef) = split /\n/, $license, 2;
for (split_licenses($license)) {
@@ -289,9 +287,8 @@ sub _parse_dep5 {
}
if (defined $license) {
if ($license =~ m/\A\s*(\n|\Z)/xms) {
- tag 'missing-field-in-dep5-copyright', 'license',
- '(empty short license,',
- "paragraph at line $lines[$i]{'START-OF-PARAGRAPH'})";
+ tag 'empty-short-license-in-dep5-copyright',
+ "(paragraph at line $lines[$i]{'START-OF-PARAGRAPH'})";
} else {
for (split_licenses($license)) {
$required_standalone_licenses{$_} = $i;
diff --git a/t/tests/source-copyright-empty-field/tags b/t/tests/source-copyright-empty-field/tags
index d0d3486..59b1517 100644
--- a/t/tests/source-copyright-empty-field/tags
+++ b/t/tests/source-copyright-empty-field/tags
@@ -1,8 +1,8 @@
+W: source-copyright-empty-field source: empty-short-license-in-dep5-copyright (header paragraph)
+W: source-copyright-empty-field source: empty-short-license-in-dep5-copyright (paragraph at line 25)
+W: source-copyright-empty-field source: empty-short-license-in-dep5-copyright (paragraph at line 61)
+W: source-copyright-empty-field source: empty-short-license-in-dep5-copyright (paragraph at line 77)
W: source-copyright-empty-field source: missing-field-in-dep5-copyright copyright (empty field, paragraph at line 7)
W: source-copyright-empty-field source: missing-field-in-dep5-copyright files (empty field, paragraph at line 43)
-W: source-copyright-empty-field source: missing-field-in-dep5-copyright license (empty short license header paragraph)
-W: source-copyright-empty-field source: missing-field-in-dep5-copyright license (empty short license, paragraph at line 25)
-W: source-copyright-empty-field source: missing-field-in-dep5-copyright license (empty short license, paragraph at line 61)
-W: source-copyright-empty-field source: missing-field-in-dep5-copyright license (empty short license, paragraph at line 77)
W: source-copyright-empty-field source: missing-license-text-in-dep5-copyright (paragraph at line 95)
W: source-copyright-empty-field source: missing-license-text-in-dep5-copyright gpl-2+ (paragraph at line 97)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: