Bug#1102334: Lintian::Tutorial::WritingTests.3: Some remarks and a patch with editorial changes for this man page
Package: lintian
Version: 2.122.0
Severity: minor
Tags: patch
* What led up to the situation?
Checking for defects with a new version
test-[g|n]roff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z < "man page"
[Use
grep -n -e ' $' -e '\\~$' -e ' \\f.$' -e ' \\"' <file>
to find (most) trailing spaces.]
["test-groff" is a script in the repository for "groff"; is not shipped]
(local copy and "troff" slightly changed by me).
[The fate of "test-nroff" was decided in groff bug #55941.]
* What was the outcome of this action?
troff:<stdin>:223: warning: trailing space in the line
troff:<stdin>:234: warning: trailing space in the line
* What outcome did you expect instead?
No output (no warnings).
-.-
General remarks and further material, if a diff-file exist, are in the
attachments.
-- System Information:
Debian Release: trixie/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 6.12.21-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages lintian depends on:
ii appstream 1.0.4-1
ii binutils 2.44-3
ii bzip2 1.0.8-6
ii diffstat 1.67-1
ii dpkg 1.22.18
ii dpkg-dev 1.22.18
ii file 1:5.45-3+b1
ii gettext 0.23.1-1
ii gpg 2.2.46-6
ii intltool-debian 0.35.0+20060710.6
ii iso-codes 4.17.0-1
ii libapt-pkg-perl 0.1.41
ii libarchive-zip-perl 1.68-1
ii libberkeleydb-perl 0.66-1
ii libcapture-tiny-perl 0.50-1
ii libclass-xsaccessor-perl 1.19-4+b5
ii libclone-perl 0.47-1+b1
ii libconfig-tiny-perl 2.30-1
ii libconst-fast-perl 0.014-2
ii libcpanel-json-xs-perl 4.39-1
ii libdata-dpath-perl 0.60-1
ii libdata-validate-domain-perl 0.15-1
ii libdata-validate-uri-perl 0.07-3
ii libdevel-size-perl 0.84-1+b1
pn libdigest-sha-perl <none>
ii libdpkg-perl 1.22.18
ii libemail-address-xs-perl 1.05-1+b4
pn libencode-perl <none>
ii libfile-basedir-perl 0.09-2
ii libfile-find-rule-perl 0.34-3
ii libfont-ttf-perl 1.06-2
ii libhtml-html5-entities-perl 0.004-3
ii libhtml-tokeparser-simple-perl 3.16-4
ii libio-interactive-perl 1.026-1
ii libipc-run3-perl 0.049-1
ii libjson-maybexs-perl 1.004008-1
ii liblist-compare-perl 0.55-2
ii liblist-someutils-perl 0.59-1
ii liblist-utilsby-perl 0.12-2
ii libmldbm-perl 2.05-4
ii libmoo-perl 2.005005-1
ii libmoox-aliases-perl 0.001006-2
ii libnamespace-clean-perl 0.27-2
ii libpath-tiny-perl 0.146-1
ii libperlio-gzip-perl 0.20-1+b4
ii libperlio-utf8-strict-perl 0.010-1+b3
ii libproc-processtable-perl 0.636-1+b3
ii libregexp-wildcards-perl 1.05-3
ii libsereal-decoder-perl 5.004+ds-1+b3
ii libsereal-encoder-perl 5.004+ds-1+b3
ii libsort-versions-perl 1.62-3
ii libsyntax-keyword-try-perl 0.30-1+b1
ii libterm-readkey-perl 2.38-2+b4
ii libtext-levenshteinxs-perl 0.03-5+b4
ii libtext-markdown-discount-perl 0.18-1
ii libtext-xslate-perl 3.5.9-2+b1
ii libtime-duration-perl 1.21-2
ii libtime-moment-perl 0.44-2+b4
ii libtimedate-perl 2.3300-2
ii libunicode-utf8-perl 0.62-2+b3
ii liburi-perl 5.30-1
ii libwww-mechanize-perl 2.19-1
ii libwww-perl 6.78-1
ii libxml-libxml-perl 2.0207+dfsg+really+2.0134-5+b2
ii libyaml-libyaml-perl 0.903.0+ds-1
ii lzip [lzip-decompressor] 1.25-3
ii lzop 1.04-2
ii man-db 2.13.0-1
ii patchutils 0.4.2-1
ii perl [libversion-perl] 5.40.1-2
ii t1utils 1.41-4
ii unzip 6.0-29
ii xz-utils 5.6.4-1
lintian recommends no packages.
Versions of packages lintian suggests:
pn binutils-multiarch <none>
pn libtext-template-perl <none>
-- no debconf information
Input file is Lintian::Tutorial::WritingTests.3
Output from "mandoc -T lint Lintian::Tutorial::WritingTests.3": (shortened list)
1 : Lintian::Tutorial::WritingTests.3:206:113: STYLE: input text line longer than 80 bytes: that the (e.g.) \fId...
1 : Lintian::Tutorial::WritingTests.3:285:86: STYLE: input text line longer than 80 bytes: Copy the "upstream" ...
1 : Lintian::Tutorial::WritingTests.3:326:96: STYLE: input text line longer than 80 bytes: Create changelog, co...
1 : Lintian::Tutorial::WritingTests.3:347:125: STYLE: input text line longer than 80 bytes: and use it as a temp...
1 : Lintian::Tutorial::WritingTests.3:349:2: WARNING: empty block: RS
1 : Lintian::Tutorial::WritingTests.3:405:107: STYLE: input text line longer than 80 bytes: The directory will b...
1 : Lintian::Tutorial::WritingTests.3:457:2: WARNING: empty block: RS
1 : Lintian::Tutorial::WritingTests.3:490:2: WARNING: empty block: RS
-.-.
Output from
test-nroff -mandoc -t -ww -z Lintian::Tutorial::WritingTests.3: (shortened list)
2 line(s) with a trailing space
Find trailing space with:
grep -n -e ' $' -e ' \\f.$' -e ' \\"' <man page>
-.-.
Show if Pod::Man generated this.
Who is actually creating this man page? Debian or upstream?
Is the generating software out of date?
2:.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
-.-.
Remove space characters (whitespace) at the end of lines.
Use "git apply ... --whitespace=fix" to fix extra space issues, or use
global configuration "core.whitespace".
Number of lines affected is
2
-.-.
Use a no-filling text block with .nf/.fi instead of startingevery line
with '\&'.
Lintian::Tutorial::WritingTests.3:161:\& missing\-multi\-arch\-field
Lintian::Tutorial::WritingTests.3:162:\& missing\-pre\-depends\-on\-multiarch\-support
Lintian::Tutorial::WritingTests.3:228:\& This is a test package designed to exercise some feature or tag of
Lintian::Tutorial::WritingTests.3:229:\& Lintian. It is part of the Lintian test suite and may do very odd
Lintian::Tutorial::WritingTests.3:230:\& things. It should not be installed like a regular package. It may
Lintian::Tutorial::WritingTests.3:231:\& be an empty package.
Lintian::Tutorial::WritingTests.3:232:\& .
Lintian::Tutorial::WritingTests.3:233:\& Missing M\-A field.
Lintian::Tutorial::WritingTests.3:240:\& This is a test package designed to exercise some feature or tag of
Lintian::Tutorial::WritingTests.3:241:\& Lintian. It is part of the Lintian test suite and may do very odd
Lintian::Tutorial::WritingTests.3:242:\& things. It should not be installed like a regular package. It may
Lintian::Tutorial::WritingTests.3:243:\& be an empty package.
Lintian::Tutorial::WritingTests.3:244:\& .
Lintian::Tutorial::WritingTests.3:245:\& Missing Pre\-Depends.
Lintian::Tutorial::WritingTests.3:418:\& # Remove the exact standards version, so the tags file will not need
Lintian::Tutorial::WritingTests.3:419:\& # to be updated with every new standards\-version
Lintian::Tutorial::WritingTests.3:420:\& s/\e(current is ([0\-9]+\e.)+[0\-9]\e)/(current is CURRENT)/
Lintian::Tutorial::WritingTests.3:422:\& # Drop all hardening tags (they can differ between architectures)
Lintian::Tutorial::WritingTests.3:423:\& /: hardening\-.*/ d
Lintian::Tutorial::WritingTests.3:425:\& # Massage e.g. usr/lib/i386\-linux\-gnu/pkgconfig into a generic path
Lintian::Tutorial::WritingTests.3:426:\& s, usr/lib/[^/]+/pkgconfig/, usr/lib/ARCH/pkgconfig/,
-.-.
Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z ":
troff:<stdin>:223: warning: trailing space in the line
troff:<stdin>:234: warning: trailing space in the line
-.-.
Generally:
Split (sometimes) lines after a punctuation mark; before a conjunction.
--- Lintian::Tutorial::WritingTests.3 2025-04-07 22:15:58.026504580 +0000
+++ Lintian::Tutorial::WritingTests.3.new 2025-04-07 22:24:25.621636655 +0000
@@ -220,7 +220,7 @@ could look something like:
\& Maintainer: {$author}
\& Standards\-Version: {$standards_version}
\& Build\-Depends: {$build_depends}
-\&
+\&
\& Package: {$source}\-missing\-ma
\& Architecture: {$architecture}
\& Depends: $\e{shlibs:Depends\e}, $\e{misc:Depends\e}
@@ -231,7 +231,7 @@ could look something like:
\& be an empty package.
\& .
\& Missing M\-A field.
-\&
+\&
\& Package: {$source}\-missing\-pred
\& Architecture: any
\& Depends: $\e{shlibs:Depends\e}, $\e{misc:Depends\e}
Any program (person), that produces man pages, should check the output
for defects by using (both groff and nroff)
[gn]roff -mandoc -t -ww -b -z -K utf8 <man page>
To find trailing space use
grep -n -e ' $' -e ' \\f.$' -e ' \\"' <man page>
The same goes for man pages that are used as an input.
For a style guide use
mandoc -T lint
-.-
Any "autogenerator" should check its products with the above mentioned
'groff', 'mandoc', and additionally with 'nroff ...'.
It should also check its input files for too long (> 80) lines.
This is just a simple quality control measure.
The "autogenerator" may have to be corrected to get a better man page,
the source file may, and any additional file may.
Common defects:
Not removing trailing spaces (in in- and output).
The reason for these trailing spaces should be found and eliminated.
"git" has a "tool" to point out whitespace,
see for example "git-apply(1)" and git-config(1)")
Not beginning each input sentence on a new line.
Line length and patch size should thus be reduced.
The script "reportbug" uses 'quoted-printable' encoding when a line is
longer than 1024 characters in an 'ascii' file.
See man-pages(7), item "semantic newline".
-.-
The difference between the formatted output of the original and patched file
can be seen with:
nroff -mandoc <file1> > <out1>
nroff -mandoc <file2> > <out2>
diff -d -u <out1> <out2>
and for groff, using
\"printf '%s\n%s\n' '.kern 0' '.ss 12 0' | groff -mandoc -Z - \"
instead of 'nroff -mandoc'
Add the option '-t', if the file contains a table.
Read the output from 'diff -d -u ...' with 'less -R' or similar.
-.-.
If 'man' (man-db) is used to check the manual for warnings,
the following must be set:
The option "-warnings=w"
The environmental variable:
export MAN_KEEP_STDERR=yes (or any non-empty value)
or
(produce only warnings):
export MANROFFOPT="-ww -b -z"
export MAN_KEEP_STDERR=yes (or any non-empty value)
-.-
Reply to: