Package: tar
Version: 1.35+dfsg-3.1
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 "groff -e ' $' -e '\\~$' <file>" to find obvious 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?

an.tmac:rmt-tar.8:237: misuse, warning: .BR is for at least 2 arguments, got 1
        Use macro '.B' for one argument or split argument.

   * 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.12-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 tar depends on:
ii  libacl1      2.3.2-2+b1
ii  libc6        2.40-7
ii  libselinux1  3.8-3

tar recommends no packages.

Versions of packages tar suggests:
ii  bzip2        1.0.8-6
ii  ncompress    5.0-3
ii  tar-doc      1.35-2
pn  tar-scripts  <none>
ii  xz-utils     5.6.3-1+b1

-- no debconf information
Input file is rmt-tar.8

Output from "mandoc -T lint  rmt-tar.8": (shortened list)


-.-.

Output from "test-groff -mandoc -t -ww -z rmt-tar.8": (shortened list)


      1         Use macro '.B' for one argument or split argument.
      1 .BR is for at least 2 arguments, got 1

-.-.

Add a "\&" (or a comma (Oxford comma)) after "e.g." and "i.e.",
or use English words
(man-pages(7)).
Abbreviation points should be marked as such and protected against being
interpreted as an end of sentence, if they are not, and that independent
of the current place on the line.

86:In addition, a combined form is also allowed, i.e. a decimal mode followed

-.-.

Wrong distance between sentences in the input file.

  Separate the sentences and subordinate clauses; each begins on a new
line.  See man-pages(7) ("Conventions for source file layout") and
"info groff" ("Input Conventions").

  The best procedure is to always start a new sentence on a new line,
at least, if you are typing on a computer.

Remember coding: Only one command ("sentence") on each (logical) line.

E-mail: Easier to quote exactly the relevant lines.

Generally: Easier to edit the sentence.

Patches: Less unaffected text.

Search for two adjacent words is easier, when they belong to the same line,
and the same phrase.

  The amount of space between sentences in the output can then be
controlled with the ".ss" request.

Mark a final abbreviation point as such by suffixing it with "\&".

Some sentences (etc.) do not begin on a new line.

Split (sometimes) lines after a punctuation mark; before a conjunction.

  Lines with only one (or two) space(s) between sentences could be split,
so latter sentences begin on a new line.

Use

#!/usr/bin/sh

sed -e '/^\./n' \
-e 's/\([[:alpha:]]\)\.  */\1.\n/g' $1

to split lines after a sentence period.
Check result with the difference between the formatted outputs.
See also the attachment "general.bugs"

63:Opens the \fIdevice\fR with given \fIflags\fR. If a
127:Where to measure offset from. Valid values are:
140:on success. The \fIoffset\fR is the new offset in file.

-.-.

Put a parenthetical sentence, phrase on a separate line,
if not part of a code.
See man-pages(7), item "semantic newline".

rmt-tar.8:37:an argument (if required) and a newline character.  Additional 
data,
rmt-tar.8:77:(the initial \fBO_\fR may be omitted), or a bitwise or (using 
\fB|\fR)

-.-.

Remove quotes when there is a printable
but no space character between them
and the quotes are not for emphasis (markup),
for example as an argument to a macro.

16:.TH RMT 8 "March 24, 2018" "RMT" "GNU TAR Manual"

-.-.

Section headings (.SH and .SS) do not need quoting.

226:.SH "SEE ALSO"
231:.SH "BUG REPORTS"

-.-.

Output from "test-groff  -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z 
":

an.tmac:<stdin>:237: misuse, warning: .BR is for at least 2 arguments, got 1
        Use macro '.B' for one argument or split argument.
an-end-check:<stdin>: Warning: Different number of .RS and .RE calls, 
an-RS-open=1 at end of file

-.-.

Generally:

Split (sometimes) lines after a punctuation mark; before a conjunction.
--- rmt-tar.8   2025-02-26 19:27:29.336541152 +0000
+++ rmt-tar.8.new       2025-02-26 20:03:09.863950320 +0000
@@ -13,7 +13,7 @@
 .\"
 .\" You should have received a copy of the GNU General Public License
 .\" along with this program.  If not, see <http://www.gnu.org/licenses/>.
-.TH RMT 8 "March 24, 2018" "RMT" "GNU TAR Manual"
+.TH RMT 8 "March 24, 2018" RMT "GNU TAR Manual"
 .SH NAME
 rmt \- remote magnetic tape server
 .SH SYNOPSIS
@@ -34,7 +34,9 @@ The calling program communicates with
 .B rmt
 by sending requests on its standard input and reading replies from the
 standard output.  A request consists of a request letter followed by
-an argument (if required) and a newline character.  Additional data,
+an argument
+(if required)
+and a newline character.  Additional data,
 if any, are sent after the newline.  On success,
 .B rmt
 returns
@@ -60,8 +62,9 @@ the subsequent section.
 .SH COMMANDS
 .TP
 .BI O device \en flags \en
-Opens the \fIdevice\fR with given \fIflags\fR. If a
-device had already been opened, it is closed before opening the new one.
+Opens the \fIdevice\fR with given \fIflags\fR.
+If a device had already been opened,
+it is closed before opening the new one.
 .sp
 .B Arguments
 .RS
@@ -74,7 +77,9 @@ Flags for
 .BR open (2):
 a decimal number, or any valid \fBO_*\fR constant from
 .B fcntl.h
-(the initial \fBO_\fR may be omitted), or a bitwise or (using \fB|\fR)
+(the initial \fBO_\fR may be omitted),
+or a bitwise or
+(using \fB|\fR)
 of any number of these, e.g.:
 .in +4
 .EX
@@ -82,8 +87,8 @@ of any number of these, e.g.:
 64|512
 CREAT|TRUNC
 .EE
-.RS
-In addition, a combined form is also allowed, i.e. a decimal mode followed
+.in -4
+In addition, a combined form is also allowed, i.e.\& a decimal mode followed
 by its symbolic representation.  In this case the symbolic representation
 is given preference.
 .RE
@@ -124,7 +129,8 @@ parameters.
 .RS
 .TP
 .I whence
-Where to measure offset from. Valid values are:
+Where to measure offset from.
+Valid values are:
 .sp
 .nf
 .ta 1n 20n
@@ -137,7 +143,8 @@ Where to measure offset from. Valid valu
 .B Reply
 .br
 .BI A offset \en
-on success. The \fIoffset\fR is the new offset in file.
+on success.
+The \fIoffset\fR is the new offset in file.
 .TP
 .B Extensions
 BSD version allows only 0,1,2 as \fIwhence\fR.
@@ -223,18 +230,18 @@ None
 On success: \fBA\fIcount\fB\en\fR followed by \fIcount\fR bytes of
 data.
 .RE
-.SH "SEE ALSO"
+.SH SEE ALSO
 .BR tar (1).
 .SH BUGS
 Using this utility as a general-purpose remote file access tool is
 discouraged.
-.SH "BUG REPORTS"
+.SH BUG REPORTS
 Report bugs to <bug\-t...@gnu.org>.
 .SH HISTORY
 The
 .B rmt
 command appeared in 4.2BSD.  The GNU
-.BR rmt
+.B rmt
 is written from scratch, using the BSD specification.
 .SH COPYRIGHT
 Copyright \(co 2013, 2018 Free Software Foundation, Inc.
  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>

  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 via email to