Package: xutils-dev
Version: 1:7.7+7
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?


troff:<stdin>:49: warning: trailing space in the line
troff:<stdin>:55: warning: trailing space in the line
troff:<stdin>:65: 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.17-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 xutils-dev depends on:
ii  cpp    4:14.2.0-1
ii  libc6  2.41-4

xutils-dev recommends no packages.

xutils-dev suggests no packages.

-- no debconf information
Input file is lndir.1

Output from "mandoc -T lint  lndir.1": (shortened list)

     11 whitespace at end of input line


Remove trailing space with: sed -e 's/  *$//'

-.-.

Output from "test-nroff -mandoc -t -ww -z lndir.1": (shortened list)

      3 trailing space in the line


Remove trailing space with: sed -e 's/  *$//'

-.-.

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

11

-.-.

Reduce space between words.

lndir.1:93:(symbolic link) entry in \fIfromdir.\fP  The \fB\-ignorelinks\fP flag

-.-.

Find a repeated word

! 89 --> never

-.-.

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

lndir.1:74:argument may be relative (e.g., ../src) and is relative to
lndir.1:103:corresponding (symbolic link) file in \fIfromdir\fP.

-.-.

Put a subordinate sentence (after a comma) on a new line.

lndir.1:59:containing links to the real source, which you will have usually
lndir.1:60:mounted from a remote machine.  You can build in the shadow tree, and
lndir.1:61:the object files will be in the shadow directory, while the
lndir.1:65:This scheme has the advantage that if you update the source, you 
need not 
lndir.1:66:propagate the change to the other architectures by hand, since all
lndir.1:74:argument may be relative (e.g., ../src) and is relative to
lndir.1:79:Note that BitKeeper, CVS, CVS.adm, .git, .hg, RCS, SCCS, and .svn 
directories
lndir.1:83:If you add files, simply run
lndir.1:91:If a file in \fIfromdir\fP is a symbolic link, \fIlndir\fP will make
lndir.1:104:If the link is to a directory, this is almost certainly the wrong 
thing.
lndir.1:111:to be treated as any other directory, rather than ignored.
lndir.1:113:The program displays the name of each subdirectory it enters, 
followed
lndir.1:120:If the link already exists but doesn't point to the correct file, 
the

-.-.

Space character after a macro call.

50:.I todir 
52:.I fromdir, 
77:.PP 

-.-.

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

troff:<stdin>:49: warning: trailing space in the line
troff:<stdin>:55: warning: trailing space in the line
troff:<stdin>:65: warning: trailing space in the line

-.-.

Additionally:

Add a space to a IP tag, to increas distance to the following text.

-.-

Generally:

Split (sometimes) lines after a punctuation mark; before a conjunction.
--- lndir.1     2025-03-18 02:03:13.080029836 +0000
+++ lndir.1.new 2025-03-18 02:25:35.115344959 +0000
@@ -1,16 +1,16 @@
 .\" $Xorg: lndir.man,v 1.4 2001/02/09 02:03:17 xorgcvs Exp $
 .\"
 .\" Copyright (c) 1993, 1994, 1998 The Open Group
-.\" 
+.\"
 .\" Permission to use, copy, modify, distribute, and sell this software and its
 .\" documentation for any purpose is hereby granted without fee, provided that
 .\" the above copyright notice appear in all copies and that both that
 .\" copyright notice and this permission notice appear in supporting
 .\" documentation.
-.\" 
+.\"
 .\" The above copyright notice and this permission notice shall be
 .\" included in all copies or substantial portions of the Software.
-.\" 
+.\"
 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 .\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -18,12 +18,12 @@
 .\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 .\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 .\" OTHER DEALINGS IN THE SOFTWARE.
-.\" 
+.\"
 .\" Except as contained in this notice, the name of The Open Group shall
 .\" not be used in advertising or otherwise to promote the sale, use or
 .\" other dealings in this Software without prior written authorization
 .\" from The Open Group.
-.\" 
+.\"
 .\"
 .\" $XFree86: xc/config/util/lndir.man,v 1.3tsi Exp $
 .\"
@@ -46,41 +46,48 @@ lndir \- create a shadow directory of sy
 .SH DESCRIPTION
 The
 .I lndir
-program makes a shadow copy 
-.I todir 
+program makes a shadow copy
+.I todir
 of a directory tree
-.I fromdir, 
+.IR fromdir ,
 except that the shadow is not
 populated with real files but instead with symbolic links pointing at
-the real files in the 
+the real files in the
 .I fromdir
 directory tree.  This is usually useful for maintaining source code for
 different machine architectures.  You create a shadow directory
-containing links to the real source, which you will have usually
-mounted from a remote machine.  You can build in the shadow tree, and
-the object files will be in the shadow directory, while the
-source files in the shadow directory are just symlinks to the real
-files.
-.PP
-This scheme has the advantage that if you update the source, you need not 
-propagate the change to the other architectures by hand, since all
-source in all shadow directories are symlinks to the real thing: just cd
-to the shadow directory and recompile away.
+containing links to the real source,
+which you will have usually mounted from a remote machine.
+You can build in the shadow tree,
+and the object files will be in the shadow directory,
+while the source files in the shadow directory are just symlinks to the
+real files.
+.PP
+This scheme has the advantage
+that if you update the source,
+you need not propagate the change to the other architectures by hand,
+since all source in all shadow directories are symlinks to the real
+thing:
+just cd to the shadow directory and recompile away.
 .PP
 The
 .I todir
 argument is optional and defaults to the current directory.  The
 .I fromdir
-argument may be relative (e.g., ../src) and is relative to
+argument may be relative
+(e.g., ../src)
+and is relative to
 .I todir
 (not the current directory).
-.PP 
+.PP
 .\" CVS.adm is used by the Concurrent Versions System.
-Note that BitKeeper, CVS, CVS.adm, .git, .hg, RCS, SCCS, and .svn directories
-are shadowed only if the \fB\-withrevinfo\fP flag is specified.
+Note that BitKeeper, CVS, CVS.adm, .git, .hg, RCS, SCCS,
+and .svn directories are shadowed
+only if the \fB\-withrevinfo\fP flag is specified.
 Files with names ending in \fI~\fP are never shadowed.
 .PP
-If you add files, simply run
+If you add files,
+simply run
 .I lndir
 again.  New files will be silently added.  Old files will be
 checked that they have the correct link.
@@ -88,12 +95,14 @@ checked that they have the correct link.
 Deleting files is a more painful problem; the symlinks will
 just point into never never land.
 .PP
-If a file in \fIfromdir\fP is a symbolic link, \fIlndir\fP will make
-the same link in \fItodir\fP rather than making a link back to the
-(symbolic link) entry in \fIfromdir.\fP  The \fB\-ignorelinks\fP flag
-changes this behavior.
+If a file in \fIfromdir\fP is a symbolic link,
+\fIlndir\fP will make the same link in \fItodir\fP
+rather than making a link back to the
+(symbolic link)
+entry in \fIfromdir\fP.
+The \fB\-ignorelinks\fP flag changes this behavior.
 .SH OPTIONS
-.IP \-silent
+.IP "\-silent \&"
 Normally \fIlndir\fP outputs the name of each subdirectory as it
 descends into it.  The \fB\-silent\fP option suppresses these status
 messages.
@@ -101,23 +110,27 @@ messages.
 Causes the program to not treat symbolic links in \fIfromdir\fP
 specially.  The link created in \fItodir\fP will point back to the
 corresponding (symbolic link) file in \fIfromdir\fP.
-If the link is to a directory, this is almost certainly the wrong thing.
+If the link is to a directory,
+this is almost certainly the wrong thing.
 .IP
 This option exists mostly to emulate the behavior the C version of
 \fIlndir\fP had in X11R6.  Its use is not recommended.
 .IP \-withrevinfo
 Causes any source control manager subdirectories
 (those named BitKeeper, CVS, CVS.adm, .git, .hg, RCS, SCCS, or .svn)
-to be treated as any other directory, rather than ignored.
+to be treated as any other directory,
+rather than ignored.
 .SH DIAGNOSTICS
-The program displays the name of each subdirectory it enters, followed
-by a colon.  The \fB\-silent\fP option suppresses these messages.
+The program displays the name of each subdirectory it enters,
+followed by a colon.
+The \fB\-silent\fP option suppresses these messages.
 .PP
 A warning message is displayed if the symbolic link cannot be created.
 The usual problem is that a regular file of the same name already
 exists.
 .PP
-If the link already exists but doesn't point to the correct file, the
-program prints the link name and the location where it does point.
+If the link already exists but doesn't point to the correct file,
+the program prints the link name
+and the location where it does point.
 .SH SEE ALSO
 .BR ln (1).
  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