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

lintian: r1149 - in trunk: checks debian



Author: cjwatson
Date: 2008-01-28 13:12:14 +0100 (Mon, 28 Jan 2008)
New Revision: 1149

Modified:
   trunk/checks/manpages
   trunk/checks/manpages.desc
   trunk/debian/changelog
   trunk/debian/control
Log:
* checks/manpages{.desc,}:
  + [CW] Use man's new --warnings option to catch use of undefined
    strings, macros, or diversions in manual pages, which usually indicate
    mistaken use of "." or "'" at the start of a line. Requires man-db >=
    2.5.1-1.

Modified: trunk/checks/manpages
===================================================================
--- trunk/checks/manpages	2008-01-26 01:41:50 UTC (rev 1148)
+++ trunk/checks/manpages	2008-01-28 12:12:14 UTC (rev 1149)
@@ -254,9 +254,9 @@
 	# pages with .so but aren't simple links; rbash, for instance.)
 	my $cmd;
 	if ($file =~ m,^(.*)/(man\d/.*)$,) {
-	    $cmd = "cd unpacked/\Q$1\E && man -l \Q$2\E";
+	    $cmd = "cd unpacked/\Q$1\E && man --warnings -l \Q$2\E";
 	} else {
-	    $cmd = "man -l unpacked/\Q$file\E";
+	    $cmd = "man --warnings -l unpacked/\Q$file\E";
 	}
 	my $pid = open MANERRS, '-|';
 	if (not defined $pid) {

Modified: trunk/checks/manpages.desc
===================================================================
--- trunk/checks/manpages.desc	2008-01-26 01:41:50 UTC (rev 1148)
+++ trunk/checks/manpages.desc	2008-01-28 12:12:14 UTC (rev 1149)
@@ -137,6 +137,14 @@
  output.  See the groff_man (or groff_mdoc if using mdoc) man page for
  information on macros.
  .
+ This test uses <tt>man</tt>'s <tt>--warnings</tt> option to enable groff
+ warnings that catch common mistakes, such as putting <tt>.</tt> or
+ <tt>'</tt> characters at the start of a line when they are intended as
+ literal text rather than groff commands.  This can be fixed either by
+ reformatting the paragraph so that these characters are not at the start of
+ a line, or by adding a zero-width space (<tt>\&</tt>) immediately before
+ them.
+ .
  At worst, warning messages can be disabled with the .warn directive, see
  "Debugging" in the groff manual.
 

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2008-01-26 01:41:50 UTC (rev 1148)
+++ trunk/debian/changelog	2008-01-28 12:12:14 UTC (rev 1149)
@@ -23,10 +23,14 @@
     + [RA] Downgrade a missing LSB Short-Description keyword to info since
       it's not required for functionality.  Thanks, Petter Reinholdtsen.
       (Closes: #460499)
-  * checks/manpages:
+  * checks/manpages{.desc,}:
     + [RA] Make hyphen-used-as-minus-sign more conservative to avoid false
       positives with non-ASCII text and catch hyphens at the start of
       lines.  Thanks, Michal Čihař.  (Closes: #459871)
+    + [CW] Use man's new --warnings option to catch use of undefined
+      strings, macros, or diversions in manual pages, which usually indicate
+      mistaken use of "." or "'" at the start of a line. Requires man-db >=
+      2.5.1-1.
   * checks/menu-format:
     + [RA] Avoid a Perl warning for desktop entries without Exec.
     + [RA] Fix a bug that prevented Exec keys in desktop files from being

Modified: trunk/debian/control
===================================================================
--- trunk/debian/control	2008-01-26 01:41:50 UTC (rev 1148)
+++ trunk/debian/control	2008-01-28 12:12:14 UTC (rev 1149)
@@ -12,7 +12,7 @@
 Package: lintian
 Architecture: all
 Depends: perl, libdigest-md5-perl | perl (>> 5.8), dpkg-dev (>= 1.13.17),
- file, binutils, diffstat (>= 1.27-1), man-db (>= 2.3.20-1), gettext (>= 0.16),
+ file, binutils, diffstat (>= 1.27-1), man-db (>= 2.5.1-1), gettext (>= 0.16),
  intltool-debian, libparse-debianchangelog-perl (>= 0.6), liburi-perl
 Suggests: binutils-multiarch, libtext-template-perl
 Description: Debian package checker


Reply to: