[SCM] Debian package checker branch, master, updated. 6e2a1c1868d40e36b25e5dee06778e394a0083d2
The following commit has been merged in the master branch:
commit 6e2a1c1868d40e36b25e5dee06778e394a0083d2
Author: Russ Allbery <rra@debian.org>
Date: Mon Jun 30 20:36:29 2008 -0700
Warn about duplicated words in the description
* checks/description{,.desc}:
+ [RA] Warn about duplicated words in the description. Patch from
Raphael Geissert. (Closes: #424746)
diff --git a/checks/description b/checks/description
index 9f22377..5b2314d 100644
--- a/checks/description
+++ b/checks/description
@@ -116,6 +116,12 @@ while (<IN>) {
tag "description-contains-homepage";
}
+ my $wo_quotes = $_;
+ $wo_quotes =~ s,(\"|\').*(\1),,;
+ if ($wo_quotes =~ m,(?:\W|^)((\w+)\s+(\2))(?:\W|$),i) {
+ tag "description-contains-duplicated-word", "$1";
+ }
+
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 f517aaf..2fb68a9 100644
--- a/checks/description.desc
+++ b/checks/description.desc
@@ -112,3 +112,8 @@ Info: Lintian found a spelling or capitalization error in the package
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: description-contains-duplicated-word
+Type: warning
+Info: The description contains a duplicated word. Usually this is a
+ mistake, or at least an awkward phrasing.
diff --git a/debian/changelog b/debian/changelog
index 22df8f8..5e52d26 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,9 @@ lintian (1.24.2) unstable; urgency=low
* checks/changelog-file:
+ [ADB] Add missing "use Dep". Thanks gregor herrmann (Closes: #488397)
+ * checks/description{,.desc}:
+ + [RA] Warn about duplicated words in the description. Patch from
+ Raphael Geissert. (Closes: #424746)
* checks/fields{,.desc}:
+ [FL] Do not complain about obsolete packages if there are
non-obsolete alternatives specified and if the obsolete
diff --git a/testset/description/debian/control b/testset/description/debian/control
index f9e606b..6ce5767 100644
--- a/testset/description/debian/control
+++ b/testset/description/debian/control
@@ -9,7 +9,7 @@ Package: description
Architecture: all
Description: description is a package which tests lintian's description checks.
missing
- The synopsis should not start with the package's name. Moreover,
+ The the synopsis should not start with the package's name. Moreover,
the long description
should
not
@@ -32,6 +32,9 @@ Description:
. and please avoid control statements in the long description.
The line in an extended description should be less than 80 characters, otherwise you'll get
a Lintian warning.
+ .
+ And the old man said "he he is the one!"
+ "No, I am am not", he replied
Package: description-baz
Architecture: all
diff --git a/testset/tags.cdbs-test b/testset/tags.cdbs-test
index 7a30c9a..579d3b9 100644
--- a/testset/tags.cdbs-test
+++ b/testset/tags.cdbs-test
@@ -8,3 +8,4 @@ W: cdbs-test source: no-human-maintainers
W: cdbs-test source: out-of-date-standards-version 3.7.3 (current is 3.8.0)
W: cdbs-test source: package-has-a-duplicate-build-relation cdbs, cdbs
W: cdbs-test: debian-changelog-line-too-long line 1
+W: cdbs-test: description-contains-duplicated-word bla bla
diff --git a/testset/tags.description b/testset/tags.description
index 9bae99d..87eae2e 100644
--- a/testset/tags.description
+++ b/testset/tags.description
@@ -21,4 +21,5 @@ W: description-foo: description-starts-with-leading-spaces
W: description-foo: possible-unindented-list-in-extended-description
W: description: changelog-not-compressed-with-max-compression changelog.Debian.gz
W: description: debian-changelog-file-contains-obsolete-user-emacs-settings
+W: description: description-contains-duplicated-word The the
W: description: description-synopsis-might-not-be-phrased-properly
--
Debian package checker
Reply to: