[SCM] Debian package checker branch, master, updated. 2.2.2-11-g662c8bb
The following commit has been merged in the master branch:
commit 662c8bbf71e77d1abafeb701aaf971f2e5e85102
Author: Russ Allbery <rra@debian.org>
Date: Fri Feb 6 20:58:05 2009 -0800
Check for use of first person in descriptions
* checks/description{,.desc}:
+ [RA] Check for using first person in package descriptions, similar
to the existing check for debconf questions. Patch from Raphael
Geissert. (Closes: #513053)
diff --git a/checks/description b/checks/description
index fdabcaa..dfc2c11 100644
--- a/checks/description
+++ b/checks/description
@@ -127,6 +127,15 @@ foreach (split /\n/, $description) {
tag "description-contains-duplicated-word", "$words";
}
+ my $first_person = $_;
+ while ($first_person =~
+ m/(?:^|\s)(I|[Mm]y|[Oo]urs?|mine|myself|me|us|[Ww]e)(?:$|\s)/) {
+
+ my $word = $1;
+ $first_person =~ s/\Q$word//;
+ tag "using-first-person-in-description", "line $lines: $word";
+ }
+
if ($lines == 1) {
# checks for the first line of the extended description:
if (m/^\s/o) {
diff --git a/checks/description.desc b/checks/description.desc
index 46546e0..8c65521 100644
--- a/checks/description.desc
+++ b/checks/description.desc
@@ -154,3 +154,16 @@ Severity: normal
Certainty: possible
Info: The description contains a duplicated word. Usually this is a
mistake, or at least an awkward phrasing.
+
+Tag: using-first-person-in-description
+Severity: minor
+Certainty: possible
+Info: You should avoid the use of first person ("I will do this..." or
+ "We recommend..."). The computer is not a person and the description
+ does not speak for the maintainer or maintainers. Instead, use a more
+ neutral construction and try to rephrase into factual statements about
+ the package.
+ .
+ For example, rather than saying "I don't recommend this package if you
+ are short on memory," say something like "this package is not suitable
+ for low-memory systems."
diff --git a/debian/changelog b/debian/changelog
index 39b0846..39c85ce 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
lintian (2.2.3) UNRELEASED; urgency=low
* Summary of tag changes:
+ + Added
+ - using-first-person-in-description
+ Removed
- non-us-spelling
@@ -17,6 +19,10 @@ lintian (2.2.3) UNRELEASED; urgency=low
no practical effect on the Debian package. Wishlist implies that
a wishlist bug against the package would be appropriate, which
seems too strong.
+ * checks/description{,.desc}:
+ + [RA] Check for using first person in package descriptions, similar
+ to the existing check for debconf questions. Patch from Raphael
+ Geissert. (Closes: #513053)
* checks/fields{,.desc}:
+ [ADB] Remove checks for the capitalisation of the obsolete non-US
archive section.
diff --git a/t/tests/control-file-suggests-itself/debian/debian/control.in b/t/tests/description-wording/debian/debian/control.in
similarity index 72%
copy from t/tests/control-file-suggests-itself/debian/debian/control.in
copy to t/tests/description-wording/debian/debian/control.in
index 6247cd4..434dc07 100644
--- a/t/tests/control-file-suggests-itself/debian/debian/control.in
+++ b/t/tests/description-wording/debian/debian/control.in
@@ -8,8 +8,8 @@ Build-Depends: debhelper (>= 7)
Package: {$srcpkg}
Architecture: {$architecture}
Depends: $\{shlibs:Depends\}, $\{misc:Depends\}
-Suggests: {$srcpkg}
Description: {$description}
This is a test package designed to exercise some feature or tag of
Lintian. It is part of the Lintian test suite and may do very odd
- things. It should not be installed like a regular package.
+ things. You should not install it like a regular package, we can guarantee
+ you that. This is a test package. This package does nothing useful at all.
diff --git a/t/tests/description-wording/desc b/t/tests/description-wording/desc
new file mode 100644
index 0000000..3ada8a3
--- /dev/null
+++ b/t/tests/description-wording/desc
@@ -0,0 +1,6 @@
+Testname: description-wording
+Version: 1.0
+Sequence: 6000
+Description: Tests for description wording
+Test-For:
+ using-first-person-in-description
diff --git a/t/tests/description-wording/tags b/t/tests/description-wording/tags
new file mode 100644
index 0000000..cce4b81
--- /dev/null
+++ b/t/tests/description-wording/tags
@@ -0,0 +1 @@
+I: description-wording: using-first-person-in-description line 3: we
--
Debian package checker
Reply to: