[lintian] 03/07: Improve the description-synopsis-might-not-be-phrased-properly tag also detect multiple sentences and improve the tag description. (Closes: #778427)
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository lintian.
commit 518f2979822557024a3501e9a731e51ceb8220ea
Author: Chris Lamb <lamby@debian.org>
Date: Mon Jan 29 02:38:41 2018 +0000
Improve the description-synopsis-might-not-be-phrased-properly tag also detect multiple sentences and improve the tag description. (Closes: #778427)
---
checks/description.desc | 15 +++++++++------
checks/description.pm | 2 +-
debian/changelog | 5 ++++-
t/tests/description-general/debian/debian/control.in | 9 +++++++++
t/tests/description-general/tags | 1 +
.../fields-excessive-priority-for-library-package/desc | 2 +-
t/tests/fields-version-bad-rc/desc | 2 +-
7 files changed, 26 insertions(+), 10 deletions(-)
diff --git a/checks/description.desc b/checks/description.desc
index a7cef96..789f16c 100644
--- a/checks/description.desc
+++ b/checks/description.desc
@@ -141,13 +141,16 @@ Info: The extended description contains the statement that it was
Tag: description-synopsis-might-not-be-phrased-properly
Severity: minor
Certainty: possible
-Info: The synopsis (first line in the package "Description:" field, the
- short description) ends with a full stop "." character. This is not
- necessary, as the synopsis doesn't need to be a full sentence. It is
- recommended that a descriptive phrase is used instead.
+Info: The package synopsis (also known as the "short" descriptiom,, ie. the
+ first line in the package "Description:" field) either ends with a full
+ stop "." character or starts another additonal sentence.
.
- Note also that the synopsis is not part of the rest of the "Description:"
- field.
+ This is not necessary as the synopsis does nott need to be a full
+ sentence. It is recommended that a single descriptive phrase is used
+ instead.
+ .
+ Note also that the synopsis is not part of the rest of the "long"
+ Description: field.
Ref: devref 6.2.2
Tag: description-synopsis-is-duplicated
diff --git a/checks/description.pm b/checks/description.pm
index 6396466..5fb86ba 100644
--- a/checks/description.pm
+++ b/checks/description.pm
@@ -85,7 +85,7 @@ sub run {
if ($synopsis =~ m/^(an?|the)\s/i) {
tag 'description-synopsis-starts-with-article';
}
- if ($synopsis =~ m/(?<!etc)\.\s*$/i) {
+ if ($synopsis =~ m/(?<!etc)\.(?:\s*$|\s+\S+)/i) {
tag 'description-synopsis-might-not-be-phrased-properly';
}
if ($synopsis =~ m/\t/) {
diff --git a/debian/changelog b/debian/changelog
index 781beea..5766f66 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,9 +5,12 @@ lintian (2.5.73) UNRELEASED; urgency=medium
* checks/cruft.pm:
+ [CL] When looking for the source of "build/foo/bar.min.js", also
check "src/foo/bar.js". (Closes: #832027)
- * checks/description.pm:
+ * checks/description.{desc.pm}:
+ [CL] Check for packages that mention planned/upcoming features in
their long description. (Closes: #782990)
+ + [CL] Improve the description-synopsis-might-not-be-phrased-properly
+ tag also detect multiple sentences and improve the tag description.
+ (Closes: #778427)
* checks/fields.{desc,pm}:
+ [CL] Add a pedantic warning for co-maintained packages that are not
managed in a revision control system. (Closes: #884497)
diff --git a/t/tests/description-general/debian/debian/control.in b/t/tests/description-general/debian/debian/control.in
index 28f1278..72e1146 100644
--- a/t/tests/description-general/debian/debian/control.in
+++ b/t/tests/description-general/debian/debian/control.in
@@ -55,6 +55,15 @@ Description: some Lintian test package
.
Homepage: <http://lintian.debian.org/>
+Package: {$source}-5
+Architecture: {$architecture}
+Depends: $\{shlibs:Depends\}, $\{misc:Depends\}
+Description: {$source} starts a sentence. Then starts another.
+ 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. It may
+ be an empty package.
+
Package: {$source}-ends-etc
Architecture: {$architecture}
Depends: $\{shlibs:Depends\}, $\{misc:Depends\}
diff --git a/t/tests/description-general/tags b/t/tests/description-general/tags
index c9b1bb1..9733f16 100644
--- a/t/tests/description-general/tags
+++ b/t/tests/description-general/tags
@@ -12,6 +12,7 @@ E: foo-duplicate: description-is-pkg-name foo duplicate
I: description-general source: duplicate-long-description foo-duplicate foo-bar-duplicate
I: description-general-3: using-first-person-in-description line 5: I
I: description-general-4: capitalization-error-in-description debian Debian
+I: description-general-5: description-synopsis-might-not-be-phrased-properly
I: description-general-syn-spelling: capitalization-error-in-description-synopsis debian Debian
I: description-general: description-synopsis-might-not-be-phrased-properly
W: description-general-2: description-starts-with-leading-spaces
diff --git a/t/tests/fields-excessive-priority-for-library-package/desc b/t/tests/fields-excessive-priority-for-library-package/desc
index 3d8f2f7..58a7002 100644
--- a/t/tests/fields-excessive-priority-for-library-package/desc
+++ b/t/tests/fields-excessive-priority-for-library-package/desc
@@ -1,5 +1,5 @@
Testname: fields-excessive-priority-for-library-package
Version: 1.0
-Description: Library packages with excessive Priority field.
+Description: Library packages with excessive Priority field
Test-For:
excessive-priority-for-library-package
diff --git a/t/tests/fields-version-bad-rc/desc b/t/tests/fields-version-bad-rc/desc
index 9141d13..f8d5cfb 100644
--- a/t/tests/fields-version-bad-rc/desc
+++ b/t/tests/fields-version-bad-rc/desc
@@ -1,5 +1,5 @@
Testname: fields-version-bad-rc
Version: 1.0+rc3-1
-Description: Test for bad release cand. versions
+Description: Test for bad release candidate versions
Type: non-native
Test-For: rc-version-greater-than-expected-version
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: