Re: one more tag for watch-file
Raphael Geissert wrote:
>
> Will adjust it to just emit the tag when a version was set.
Done.
>
> Cheers,
Cheers,
--
Atomo64 - Raphael
Please avoid sending me Word, PowerPoint or Excel attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
diff --git a/checks/watch-file b/checks/watch-file
index 1e0ca57..8bbc564 100644
--- a/checks/watch-file
+++ b/checks/watch-file
@@ -52,6 +52,7 @@ if ($version =~ /(dfsg|debian|ds)/) {
open(WATCH, '<', 'debfiles/watch') or fail("cannot open watch file: $!");
local $_;
my ($watchver, $mangle, $dmangle);
+my $empty = 1;
while (<WATCH>) {
next if /^\s*\#/;
next if /^\s*$/;
@@ -79,10 +80,8 @@ while (<WATCH>) {
tag 'debian-watch-file-missing-version';
$watchver = 1;
}
- while (s/\\\s*$//) {
- $_ .= <WATCH>;
- }
- chomp;
+ $empty = 0;
+
my ($opts, @opts);
if (s/^opt(ion)?s=\"([^\"]+)\"\s+// || s/^opt(ion)?s=(\S+)\s+//) {
$opts = $2;
@@ -111,6 +110,10 @@ if ($repack and $mangle and not $dmangle) {
tag 'debian-watch-file-should-dversionmangle-not-uversionmangle';
}
+if ($empty and not defined($watchver)) {
+ tag "debian-watch-file-contains-no-uris";
+}
+
}
1;
diff --git a/checks/watch-file.desc b/checks/watch-file.desc
index 339b3f4..bb112d3 100644
--- a/checks/watch-file.desc
+++ b/checks/watch-file.desc
@@ -77,3 +77,8 @@ Info: The watch file seems to be passing arguments to the redirector
other than a path. Calling the SourceForge redirector with parameters like
<tt>project</tt> prevents uscan from generating working uri's to the files
and thus has been deprecated and is no longer supported by the redirector.
+
+Tag: debian-watch-file-contains-no-uris
+Type: warning
+Info: The watch file is present and specified a file version but does not
+ contain any URI to be checked.
Reply to: