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

[SCM] Debian package checker branch, master, updated. 2.4.2-22-g8d5bfe8



The following commit has been merged in the master branch:
commit 750a2d82f998ba80da3cbcbe5164a70fc9f0b1a3
Author: Russ Allbery <rra@debian.org>
Date:   Sun Jul 25 16:21:44 2010 -0700

    More correctly handle hyphenated words in spelling checks
    
    * lib/Lintian/Check.pm:
      + [RA] More correctly handle hyphenated words to avoid triggering
        spelling error false positives.  (Closes: #588896)
    
    Also regenerate test coverage.

diff --git a/debian/changelog b/debian/changelog
index b0ee4c6..f8bd062 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -25,6 +25,9 @@ lintian (2.4.3) UNRELEASED; urgency=low
   * debian/changelog:
     + [RA] Fix Policy 3.9.0 reference in 2.4.2.  (Closes: #587549)
 
+  * lib/Lintian/Check.pm:
+    + [RA] More correctly handle hyphenated words to avoid triggering
+      spelling error false positives.  (Closes: #588896)
   * lib/Lintian/Schedule.pm:
     + [ADB] Import "warning" from Lintian::Output, really fixing the
       error caused by a non-existent file referenced in a .changes
diff --git a/lib/Lintian/Check.pm b/lib/Lintian/Check.pm
index 99916c1..6d8cb36 100644
--- a/lib/Lintian/Check.pm
+++ b/lib/Lintian/Check.pm
@@ -202,7 +202,8 @@ sub check_spelling {
     my $corrections_multiword =
         Lintian::Data->new('spelling/corrections-multiword', '\|\|');
 
-    $text =~ s/[()[\]]//g;
+    $text =~ s/[()\[\]]//g;
+    $text =~ s/(\w-)\s*\n\s*/$1/;
 
     for my $word (split(/\s+/, $text)) {
         $word =~ s/[.,;:?!]+$//;
diff --git a/t/COVERAGE b/t/COVERAGE
index 2916555..3f41025 100644
--- a/t/COVERAGE
+++ b/t/COVERAGE
@@ -1,16 +1,16 @@
-Last generated 2010-06-28
+Last generated 2010-07-25
 
 The following tags are not tested by the test suite:
 
 binaries apparently-corrupted-elf-binary
 binaries binary-file-compressed-with-upx
+binaries embedded-library
 binaries library-not-linked-against-libc
 binaries missing-dependency-on-phpapi
 binaries ocaml-custom-executable
 binaries program-not-linked-against-libc
 
 changelog-file html-changelog-without-text-version
-changelog-file spelling-error-in-changelog
 changelog-file wrong-name-for-changelog-of-native-package
 changelog-file wrong-name-for-debian-changelog-file
 changelog-file wrong-name-for-upstream-changelog
@@ -28,7 +28,6 @@ control-files unknown-control-file
 
 copyright-file copyright-does-not-refer-to-common-license-file
 copyright-file copyright-should-refer-to-common-license-file-for-lgpl
-copyright-file spelling-error-in-copyright
 copyright-file usr-share-doc-symlink-points-outside-of-usr-share-doc
 copyright-file usr-share-doc-symlink-to-foreign-package
 
@@ -81,7 +80,6 @@ fields unknown-architecture
 fields unknown-field-in-control
 fields unknown-field-in-dsc
 fields unknown-priority
-fields upstream-version-not-numeric
 fields wrong-section-for-udeb
 
 files FSSTND-dir-in-var
@@ -416,8 +414,6 @@ menus menu-method-should-include-menu-h
 menus postinst-does-not-call-updatemenus
 menus postinst-should-not-set-usr-doc-link
 menus postrm-does-not-call-updatemenus
-menus spelling-error-in-doc-base-abstract-field
-menus spelling-error-in-doc-base-title-field
 
 nmu changelog-should-mention-qa
 nmu changelog-should-not-mention-nmu
@@ -531,8 +527,6 @@ binary
   package-contains-upstream-install-documentation
   postinst-does-not-call-updatemenus
   postrm-does-not-call-updatemenus
-  spelling-error-in-doc-base-abstract-field
-  spelling-error-in-doc-base-title-field
   statically-linked-binary
   su-to-root-with-usr-sbin
   su-wrapper-not-su-to-root
diff --git a/t/tests/cruft-crlf-eols/debian/debian/changelog.in b/t/tests/spelling-general/debian/debian/changelog.in
similarity index 71%
copy from t/tests/cruft-crlf-eols/debian/debian/changelog.in
copy to t/tests/spelling-general/debian/debian/changelog.in
index e6242c1..c267371 100644
--- a/t/tests/cruft-crlf-eols/debian/debian/changelog.in
+++ b/t/tests/spelling-general/debian/debian/changelog.in
@@ -1,8 +1,10 @@
 {$srcpkg} ({$version}) unstable; urgency=low
-
-  * Lintian Test Suite.
-  * Test: {$testname}
-
-  * Suppress "should close ITP bug" messages.  (Closes: #123456)
-
- -- {$author}  {$date}
+
+  * Lintian Test Suite.
+  * Test: {$testname}
+
+  * Suppress "should close ITP bug" messages.  (Closes: #123456)
+  * This line has a speling error.
+  * Corrected spelling: abov -> above.
+
+ -- {$author}  {$date}
diff --git a/t/tests/spelling-general/debian/debian/copyright b/t/tests/spelling-general/debian/debian/copyright
new file mode 100644
index 0000000..c6eaf66
--- /dev/null
+++ b/t/tests/spelling-general/debian/debian/copyright
@@ -0,0 +1,15 @@
+This is part of the testsuite of lintian. See the file debian/copyright
+in the lintian source directory for more details.
+
+Insofar as this is copyrightable, it is:
+
+    Copyright 2010 Russ Allbery <rra@debian.org>
+
+This text should not generate a spelling error for "ment":
+
+ computer  software  documentation,"  as such  terms  are  used in
+ 48 C.F.R. 12.212 (SEPT 1995)  and is provided to the U.S. Govern-
+ ment only as  a commercial end item.   Consistent with  48 C.F.R.
+ 12.212 and  48 C.F.R. 227.7202-1 through  227.7202-4 (JUNE 1995),
+
+But deafult is still a spelling error.
diff --git a/t/tests/spelling-general/debian/debian/doc-base b/t/tests/spelling-general/debian/debian/doc-base
new file mode 100644
index 0000000..9f7105f
--- /dev/null
+++ b/t/tests/spelling-general/debian/debian/doc-base
@@ -0,0 +1,9 @@
+Document: spelling-general
+Title: Check for debian doc-base spelling errors
+Author: Russ Allbery
+Abstract: This control file exercises speling error checks for Debian
+ doc-base files.
+Section: Programming
+
+Format: text
+Files: /usr/share/doc/spelling-general/copyright
diff --git a/t/tests/spelling-general/desc b/t/tests/spelling-general/desc
new file mode 100644
index 0000000..075b767
--- /dev/null
+++ b/t/tests/spelling-general/desc
@@ -0,0 +1,9 @@
+Testname: spelling-general
+Sequence: 6000
+Version: 1.0
+Description: General checks for spelling errors
+Test-For:
+ spelling-error-in-changelog
+ spelling-error-in-copyright
+ spelling-error-in-doc-base-abstract-field
+ spelling-error-in-doc-base-title-field
diff --git a/t/tests/spelling-general/tags b/t/tests/spelling-general/tags
new file mode 100644
index 0000000..5437ebd
--- /dev/null
+++ b/t/tests/spelling-general/tags
@@ -0,0 +1,4 @@
+I: spelling-general: spelling-error-in-copyright deafult default
+W: spelling-general: spelling-error-in-changelog speling spelling
+W: spelling-general: spelling-error-in-doc-base-abstract-field spelling-general:5 speling spelling
+W: spelling-general: spelling-error-in-doc-base-title-field spelling-general:2 debian Debian

-- 
Debian package checker


Reply to: