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

Bug#603053: Add a check for synopsis starting with articles



Package: lintian
Version: 2.4.3
Severity: wishlist
Tags: patch

Forwarding to the BTS, since I don't have time to work on Lintian at the
moment and don't want this to be lost.

--- Begin Message ---
Hi!

Can you verify if my patch is correct and, if yes, commit it, please?

Thank you very much!

Best regards,
Nelson
>From 1dd7d990a570dbfb913cd34dc01d6f5617dc6299 Mon Sep 17 00:00:00 2001
From: Nelson A. de Oliveira <naoliv@debian.org>
Date: Wed, 10 Nov 2010 10:45:34 -0200
Subject: [PATCH] Add a check for synopsis starting with articles

---
 checks/description      |    3 +++
 checks/description.desc |   11 +++++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/checks/description b/checks/description
index 0d75b9d..08cfbd4 100644
--- a/checks/description
+++ b/checks/description
@@ -61,6 +61,9 @@ if ($synopsis =~ m/^\s*$/) {
     if ($synopsis =~ m/^\Q$pkg\E\b/i) {
 	tag "description-starts-with-package-name", "";
     }
+    if ($synopsis =~ m/^(an?|the)\s/i) {
+	tag "description-synopsis-starts-with-article", "";
+    }
     if ($synopsis =~ m/(?<!etc)\.\s*$/i) {
 	tag "description-synopsis-might-not-be-phrased-properly", "";
     }
diff --git a/checks/description.desc b/checks/description.desc
index 26b6043..99cf9d4 100644
--- a/checks/description.desc
+++ b/checks/description.desc
@@ -52,6 +52,17 @@ Info: The first line of the "Description:" should not start with the
  have a description like this: "foo is a program that...".
 Ref: policy 3.4.1
 
+Tag: description-synopsis-starts-with-article
+Severity: minor
+Certainty: certain
+Info: The first line of the "Description:" should omit any initial indefinite
+ or definite article: "a", "an", or "the". A good heuristic is that it should
+ be possible to substitute the package <tt>name</tt> and <tt>synopsis</tt>
+ into this formula:
+ .
+ The package <tt>name</tt> provides {a,an,the,some} <tt>synopsis</tt>.
+Ref: devref 6.2.2
+
 Tag: description-contains-tabs
 Severity: important
 Certainty: certain
-- 
1.7.2.3


--- End Message ---

Reply to: