The following commit has been merged in the master branch:
commit 71609db9c5857e3c3a81f3980b7d6b2898afb1f7
Author: Adam D. Barratt <[email protected]>
Date:   Fri Apr 2 21:23:10 2010 +0100

    Transition users of Spelling.pm to the new Lintian::Check methods

diff --git a/checks/binaries b/checks/binaries
index 7d25d40..06c6fb8 100644
--- a/checks/binaries
+++ b/checks/binaries
@@ -21,7 +21,7 @@
 package Lintian::binaries;
 use strict;
 use Util;
-use Spelling;
+use Lintian::Check qw(check_spelling);
 use Lintian::Tags qw(tag);
 
 use File::Spec;
@@ -232,7 +232,7 @@ foreach my $file (sort keys %{$info->file_info}) {
     }
 
     my $strings = slurp_entire_file("strings/$file");
-    spelling_check('spelling-error-in-binary', $strings, $file);
+    check_spelling('spelling-error-in-binary', $strings, $file);
 
     # stripped?
     if ($fileinfo =~ m,not stripped\s*$,o) {
diff --git a/checks/changelog-file b/checks/changelog-file
index e3b7508..eaf5d71 100644
--- a/checks/changelog-file
+++ b/checks/changelog-file
@@ -23,7 +23,7 @@ use strict;
 
 use Lintian::Relation::Version qw(versions_gt);
 use Lintian::Tags qw(tag);
-use Spelling;
+use Lintian::Check qw(check_spelling);
 use Util;
 
 use Encode qw(decode);
@@ -160,7 +160,7 @@ if (-f 'NEWS.Debian') {
         if ($news->Distribution && $news->Distribution =~ /unreleased/i) {
             tag "debian-news-entry-has-strange-distribution", 
$news->Distribution;
         }
-        spelling_check('spelling-error-in-news-debian', $news->Changes);
+        check_spelling('spelling-error-in-news-debian', $news->Changes);
        if ($news->Changes =~ /^\s*\*\s/) {
            tag 'debian-news-entry-uses-asterisk';
        }
@@ -404,7 +404,7 @@ if (@entries) {
     # Strip out all lines that contain the word spelling to avoid false
     # positives on changelog entries for spelling fixes.
     $changes =~ s/^.*spelling.*\n//gm;
-    spelling_check('spelling-error-in-changelog', $changes);
+    check_spelling('spelling-error-in-changelog', $changes);
 }
 
 # read the changelog itself
diff --git a/checks/copyright-file b/checks/copyright-file
index 2c41416..2735bdd 100644
--- a/checks/copyright-file
+++ b/checks/copyright-file
@@ -24,9 +24,9 @@ use strict;
 use lib "$ENV{'LINTIAN_ROOT'}/checks/";
 use common_data;
 
+use Lintian::Check qw(check_spelling);
 use Lintian::Data ();
 use Lintian::Tags qw(tag);
-use Spelling;
 use Util;
 
 use Encode qw(decode);
@@ -302,7 +302,7 @@ if ($found && !$linked && 
!/(?:Copyright|Copr\.|\302\251)(?:.*|[\(C\):\s]+)\b\d{
     tag 'copyright-without-copyright-notice';
 }
 
-spelling_check('spelling-error-in-copyright', $_);
+check_spelling('spelling-error-in-copyright', $_);
 
 # Now, check for linking against libssl if the package is covered by the GPL.
 # (This check was requested by ftp-master.)  First, see if the package is
diff --git a/checks/debian-readme b/checks/debian-readme
index 729cc8f..83482ca 100644
--- a/checks/debian-readme
+++ b/checks/debian-readme
@@ -20,7 +20,7 @@
 
 package Lintian::debian_readme;
 use strict;
-use Spelling;
+use Lintian::Check qw(check_spelling);
 use Lintian::Tags qw(tag);
 
 sub run {
@@ -52,7 +52,7 @@ if ($readme =~ m/$regex/io) {
     tag("readme-debian-contains-debmake-default-email-address");
 }
 
-spelling_check('spelling-error-in-readme-debian', $readme);
+check_spelling('spelling-error-in-readme-debian', $readme);
 
 }
 
diff --git a/checks/description b/checks/description
index 0b676c7..0d75b9d 100644
--- a/checks/description
+++ b/checks/description
@@ -19,12 +19,13 @@
 # MA 02110-1301, USA.
 
 package Lintian::description;
+use warnings;
 use strict;
 
 use Encode qw(decode);
 
+use Lintian::Check qw(check_spelling check_spelling_picky);
 use Lintian::Tags qw(tag);
-use Spelling;
 use Util;
 
 sub run {
@@ -185,8 +186,8 @@ unless ($info->field('homepage') or $flagged_homepage) {
 }
 
 if ($description) {
-    spelling_check('spelling-error-in-description', $description);
-    spelling_check_picky('capitalization-error-in-description', $description);
+    check_spelling('spelling-error-in-description', $description);
+    check_spelling_picky('capitalization-error-in-description', $description);
 }
 
 }
diff --git a/checks/manpages b/checks/manpages
index be9e22b..ac2376b 100644
--- a/checks/manpages
+++ b/checks/manpages
@@ -21,8 +21,8 @@
 package Lintian::manpages;
 use strict;
 use Util;
+use Lintian::Check qw(check_spelling);
 use Lintian::Tags qw(tag);
-use Spelling;
 
 sub run {
 
@@ -319,7 +319,7 @@ foreach my $file (sort keys %{$info->index}) {
                tag "manpage-has-errors-from-pod2man", "$file:$lc";
            }
            # Check for spelling errors if the manpage is English
-           spelling_check("spelling-error-in-manpage", $line, $file)
+           check_spelling("spelling-error-in-manpage", $line, $file)
                if ($path =~ m,/man/man\d/,);
        }
        tag "hyphen-used-as-minus-sign", $file, ($hc - 10),
diff --git a/checks/menus b/checks/menus
index 02bad35..5595de4 100644
--- a/checks/menus
+++ b/checks/menus
@@ -26,9 +26,9 @@ use strict;
 use lib "$ENV{'LINTIAN_ROOT'}/checks/";
 use common_data;
 
+use Lintian::Check qw(check_spelling check_spelling_picky);
 use Lintian::Data;
 use Lintian::Tags qw(tag);
-use Spelling;
 use Util;
 
 # Supported documentation formats for doc-base files.
@@ -402,9 +402,9 @@ sub check_doc_base_field {
     # Title field.
     } elsif ($field eq 'title') {
         if (@$vals) {
-            spelling_check("spelling-error-in-doc-base-title-field",
+            check_spelling("spelling-error-in-doc-base-title-field",
                            join (' ', @$vals), "$dbfile:$line");
-            spelling_check_picky("spelling-error-in-doc-base-title-field",
+            check_spelling_picky("spelling-error-in-doc-base-title-field",
                                  join (' ', @$vals), "$dbfile:$line");
         }
 
@@ -470,9 +470,9 @@ sub check_doc_base_field {
 
         # Check spelling.
         if (@$vals) {
-            spelling_check("spelling-error-in-doc-base-abstract-field",
+            check_spelling("spelling-error-in-doc-base-abstract-field",
                            join (' ', @$vals), "$dbfile:$line");
-            spelling_check_picky("spelling-error-in-doc-base-abstract-field",
+            check_spelling_picky("spelling-error-in-doc-base-abstract-field",
                                  join (' ', @$vals), "$dbfile:$line");
         }
     }
diff --git a/t/scripts/tags.t b/t/scripts/tags.t
index 8ae048a..8c5de47 100755
--- a/t/scripts/tags.t
+++ b/t/scripts/tags.t
@@ -23,8 +23,8 @@ use warnings;
 
 use Test::More qw(no_plan);
 
+use Lintian::Check qw(check_spelling);
 use Lintian::Tags ();
-use Spelling;
 use Util qw(read_dpkg_control);
 
 my @DESCS = <$ENV{'LINTIAN_ROOT'}/checks/*.desc>;
@@ -43,7 +43,7 @@ for my $desc_file (@DESCS) {
 
            my $info = $i->{'info'} || '';
 
-           is(spelling_check(undef, $info), 0,
+           is(check_spelling(undef, $info), 0,
                "$desc_file: $i->{'tag'} has no spelling errors");
 
            # Check the tag info for unescaped <> or for unknown tags (which

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to