[SCM] Debian package checker branch, master, updated. 2.5.14-11-g171a400
The following commit has been merged in the master branch:
commit 61003da70ade35eda70b31afc5ac01399a826a8a
Author: Niels Thykier <niels@thykier.net>
Date: Sun Jun 30 10:09:05 2013 +0200
WritingChecks.pod: Add explicit return to examples
We recommend third-party checks to return explicitly, so make sure the
examples reflect this.
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/doc/tutorial/Lintian/Tutorial/WritingChecks.pod b/doc/tutorial/Lintian/Tutorial/WritingChecks.pod
index 685c082..0d535ae 100644
--- a/doc/tutorial/Lintian/Tutorial/WritingChecks.pod
+++ b/doc/tutorial/Lintian/Tutorial/WritingChecks.pod
@@ -45,6 +45,7 @@ Start with the template:
sub run {
my ($pkg, $type, $info, $proc, $group) = @_;
+ return;
}
This snippet above is a simple valid check that does "nothing at all".
@@ -132,6 +133,7 @@ The full example being:
my ($pkg, $type, $info, $proc, $group) = @_;
tag 'deb-pkg-check-works',
"I was emitted for $pkg, which was a $type package";
+ return;
}
Assuming there is a tag called "deb-pkg-check-works" in your I<.desc>
@@ -173,6 +175,7 @@ in all lowercase letters (i.e. use "multi-arch", not "Multi-Arch").
# Emit a "missing-multi-arch-field" for all packages without the
# Multi-Arch field
tag 'missing-multi-arch-field' unless defined($multiarch);
+ return;
}
This was the first half. Lets look at checking the value. Multi-arch
@@ -219,6 +222,7 @@ We will use the second here:
# Multi-Arch field
tag 'missing-multi-arch-field';
}
+ return;
}
So far so good.
@@ -286,6 +290,7 @@ Inserted in the proper place, our check now looks like:
# Multi-Arch field
tag 'missing-multi-arch-field';
}
+ return;
}
=head2 Using static data files
@@ -395,6 +400,7 @@ So the resulting check is:
# Multi-Arch field
tag 'missing-multi-arch-field';
}
+ return;
}
=head2 Accessing contents of the package
--
Debian package checker
Reply to: