[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[lintian] 01/01: Check bug over 1000000



This is an automated email from the git hooks/post-receive script.

broucaries-guest pushed a commit to branch master
in repository lintian.

commit fc03bde2a787f600c4ff67bba8109f812aefd51c
Author: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
Date:   Sun Mar 26 14:41:07 2017 +0200

    Check bug over 1000000
---
 checks/changelog-file.pm        | 11 ++++++++++-
 data/changelog-file/bugs-number |  4 ++++
 debian/changelog                |  3 +++
 3 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/checks/changelog-file.pm b/checks/changelog-file.pm
index fd48cfe..26b5d7a 100644
--- a/checks/changelog-file.pm
+++ b/checks/changelog-file.pm
@@ -34,6 +34,11 @@ use Lintian::Relation::Version qw(versions_gt);
 use Lintian::Tags qw(tag);
 use Lintian::Util qw(file_is_encoded_in_non_utf8 strip);
 
+use Lintian::Data ();
+
+my $BUGS_NUMBER
+  = Lintian::Data->new('changelog-file/bugs-number', qr/\s*=\s*/o);
+
 my $SPELLING_ERROR_IN_NEWS
   = spelling_tag_emitter('spelling-error-in-news-debian');
 my $SPELLING_ERROR_CHANGELOG
@@ -391,8 +396,12 @@ sub run {
         }
 
         my $closes = $entry->Closes;
+        # before bug 50004 bts removed bug instead of archiving
         for my $bug (@$closes) {
-            tag 'improbable-bug-number-in-closes', $bug if ($bug < 2000);
+            if (   $bug < $BUGS_NUMBER->value('min-bug')
+                || $bug > $BUGS_NUMBER->value('max-bug')) {
+                tag 'improbable-bug-number-in-closes', $bug;
+            }
         }
 
         # unstable, testing, and stable shouldn't be used in Debian
diff --git a/data/changelog-file/bugs-number b/data/changelog-file/bugs-number
new file mode 100644
index 0000000..45e3313
--- /dev/null
+++ b/data/changelog-file/bugs-number
@@ -0,0 +1,4 @@
+# before 50004 but were removed not archived
+min-bug = 50004
+# a bug number likely for in future
+max-bug = 1000000
\ No newline at end of file
diff --git a/debian/changelog b/debian/changelog
index 09305c1..dfcf593 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,9 @@ lintian (2.5.51) UNRELEASED; urgency=medium
 
   XXX: generate tag summary
 
+  * checks/changelog-file.pm:
+    + [BR] Check also bug over 1000000 as improbable. Bug below
+      50004 are not archived and are thus improbable.
   * checks/changes-file.{desc,pm}:
     + [BR] Apply patch by Simon McVittie to detect unreleased package
       uploaded to unstable and  mismatched .changes and

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: