Package:lintian
Severity: normal
Tags: patch

Dear maintainer,
I recently looked through short descriptions of packages in the Debian
archive. I found that typos were not detected by Lintian, even though
spellings like "developpement" already are in Lintian's typo list. It
seems that only the extended description is spell-checked, not the
synopsis. This makes Lintian miss a number of packages where only the
synopsis contains the typo.

The attached patch is a suggestion how one could add spelling and
capitalization checking for the synopsis as well, not only the extended
description.


Some examples of packages one can run Lintian on to test spelling (typos
present in the archive today, and not caught by unpatched lintian):

libdbusmenu-gtk-dev (library for passing menus over DBus - GTK+ version
developement files)
libschroedinger-ocaml-dev (OCaml interface to the schroedinger library
-- developpement files)
pwman3 (console password managment application)

Example of capitalization not caught by unpatched lintian:
tuareg-mode (emacs-mode for ocaml programs)

Regards,
Anders Jonsson
>From 5c36fff85d32cad43296cf1fcde3f01347876cad Mon Sep 17 00:00:00 2001
From: Anders Jonsson <anders.jons...@norsjovallen.se>
Date: Tue, 6 May 2014 22:56:00 +0200
Subject: Add spell checking for synopsis as well

---
 checks/description.desc | 17 +++++++++++++++++
 checks/description.pm   |  7 +++++++
 2 files changed, 24 insertions(+)

diff --git a/checks/description.desc b/checks/description.desc
index d6c31aa..890e5bf 100644
--- a/checks/description.desc
+++ b/checks/description.desc
@@ -136,6 +136,23 @@ Info: The first line of the extended Description: should 
not repeat the
  or that the extended description has been wrongly copied and pasted.
 Ref: policy 3.4.2
 
+Tag: spelling-error-in-description-synopsis
+Severity: minor
+Certainty: certain
+Info: Lintian found a spelling error in the package synopsis.  Lintian
+ has a list of common misspellings that it looks for.  It does not have a
+ dictionary like a spelling checker does.  It is particularly picky about
+ spelling and capitalization in package descriptions since they're very
+ visible to end users.
+
+Tag: capitalization-error-in-description-synopsis
+Severity: minor
+Certainty: wild-guess
+Info: Lintian found a possible capitalization error in the package
+ synopsis.  Lintian has a list of common capitalization errors,
+ primarily of upstream projects, that it looks for.  It does not have a
+ dictionary like a spelling checker does.
+
 Tag: extended-description-line-too-long
 Severity: normal
 Certainty: certain
diff --git a/checks/description.pm b/checks/description.pm
index 6a66b94..fca1498 100644
--- a/checks/description.pm
+++ b/checks/description.pm
@@ -202,6 +202,13 @@ sub run {
         }
     }
 
+    if ($synopsis) {
+        check_spelling('spelling-error-in-description-synopsis',
+            $synopsis,undef, $group->info->spelling_exceptions);
+        check_spelling_picky('capitalization-error-in-description-synopsis',
+            $synopsis);
+    }
+
     if ($description) {
         check_spelling('spelling-error-in-description',
             $description,undef, $group->info->spelling_exceptions);
-- 
2.0.0.rc0

Reply via email to