Package: icu-devtools
Version: 72.1-5+b1
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 -ww -z < "man page"

  [Use "groff -e ' $' <file>" to find 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:<stdin>:16: style: .BR expects at least 2 arguments, got 1
an.tmac:<stdin>:19: style: .BR expects at least 2 arguments, got 1
an.tmac:<stdin>:22: style: .BR expects at least 2 arguments, got 1
an.tmac:<stdin>:28: style: .BI expects at least 2 arguments, got 1
an.tmac:<stdin>:43: style: .BI expects at least 2 arguments, got 1
troff:<stdin>:53: warning: trailing space in the line
an.tmac:<stdin>:73: style: .BI expects at least 2 arguments, got 1
an.tmac:<stdin>:77: style: .BR expects at least 2 arguments, got 1
an.tmac:<stdin>:80: style: .BR expects at least 2 arguments, got 1
an.tmac:<stdin>:85: style: .BR expects at least 2 arguments, got 1
an.tmac:<stdin>:88: style: .BR expects at least 2 arguments, got 1
an.tmac:<stdin>:104: style: .BI expects at least 2 arguments, got 1
troff:<stdin>:126: warning: trailing space in the line
troff:<stdin>:133: warning: trailing space in the line
troff:<stdin>:136: warning: trailing space in the line
an.tmac:<stdin>:144: style: .BR expects at least 2 arguments, got 1
troff:<stdin>:145: warning: trailing space in the line
an.tmac:<stdin>:158: style: .BI expects at least 2 arguments, got 1
an.tmac:<stdin>:164: style: .BI expects at least 2 arguments, got 1


   * 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.11.10-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 icu-devtools depends on:
ii  libc6       2.40-4
ii  libgcc-s1   14.2.0-8
ii  libicu72    72.1-5+b1
ii  libstdc++6  14.2.0-8

icu-devtools recommends no packages.

icu-devtools suggests no packages.

-- no debconf information
Input file is derb.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

-.-

  So any 'generator' should check its products with the above mentioned
'groff', 'mandoc',  and additionally with 'nroff ...'.

  This is just a simple quality control measure.

  The 'generator' may have to be corrected to get a better man page,
the source file may, and any additional file may.

  Common defects:

  Input text line longer than 80 bytes.

  Not removing trailing spaces (in in- and output).
  The reason for these trailing spaces should be found and eliminated.

  Not beginning each input sentence on a new line.
Lines should thus be shorter.

  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 -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 of 'diff -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)


-.-.

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

      1 input text line longer than 80 bytes
      5 whitespace at end of input line

-.-.

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

      5 trailing space in the line

-.-.

Output from "mandoc -T lint  derb.1":

mandoc: derb.1:53:71: STYLE: whitespace at end of input line
mandoc: derb.1:71:90: STYLE: input text line longer than 80 bytes: will produce 
a file ...
mandoc: derb.1:126:3: STYLE: whitespace at end of input line
mandoc: derb.1:133:4: STYLE: whitespace at end of input line
mandoc: derb.1:136:39: STYLE: whitespace at end of input line
mandoc: derb.1:145:45: STYLE: whitespace at end of input line

-.-.

Remove space characters at the end of lines.

Use "git apply ... --whitespace=fix" to fix extra space issues, or use
global configuration "core.whitespace".

53:extension while compiled resource bundle source files typically have a 
126:If 
133:the 
136:the location set when ICU was built if 
145:or is the location set when ICU was built if 

-.-.

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

58:i.e. to use a local identifier for the
60:filename, e.g.

-.-.

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 abbreviation point as such by suffixing them with "\\&".


N.B.

  The number of lines affected can be too large to be in a patch.

98:representation. Characters that cannot be represented in the
116:bytes. The default if
182:Specifies the directory containing ICU data. Defaults to
184:Some tools in ICU depend on the presence of the trailing slash. It is thus
195:Copyright (C) 2002 IBM, Inc. and others.

-.-.

Split lines longer than 80 characters into two or more lines.
Appropriate break points are the end of a sentence and a subordinate
clause; after punctuation marks.

N.B.

  The number of lines affected can be too large to be in a patch.


Line 71, length 90

will produce a file whose base name is the base name of the compiled resource 
file itself.


-.-.

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

derb.1:94:The default encoding is the invariant (subset of ASCII or EBCDIC)
derb.1:114:Truncate individual resources (strings or binary data) to

-.-.

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

troff:<stdin>:53: warning: trailing space in the line
troff:<stdin>:126: warning: trailing space in the line
troff:<stdin>:133: warning: trailing space in the line
troff:<stdin>:136: warning: trailing space in the line
troff:<stdin>:145: warning: trailing space in the line

-.- 

  Abbreviations get a '\&' added after their final full stop (.) to mark them
as such and not as an end of a sentence.

  There is no need to add a '\&' before a full stop (.) if it has a character
before it!
--- derb.1      2024-12-14 01:38:22.986372330 +0000
+++ derb.1.new  2024-12-14 02:24:04.376176659 +0000
@@ -13,36 +13,41 @@
 .SH SYNOPSIS
 .B derb
 [
-.BR "\-h\fP, \fB\-?\fP, \fB\-\-help"
+.BR \-h ", " \-? ", " \-\-help
 ]
 [
-.BR "\-V\fP, \fB\-\-version"
+.BR \-V ", " \-\-version
 ]
 [
-.BR "\-v\fP, \fB\-\-verbose"
+.BR \-v ", " \-\-verbose
 ]
 [
-.BI "\-e\fP, \fB\-\-encoding" " encoding"
+.BR  \-e ", " \-\-encoding
+.I encoding
 ]
 [
-.BI "\-\-bom"
+.B \-\-bom
 ]
 [
-.BI "\-t\fP, \fB\-\-truncate" " \fR[ \fPsize\fR ]\fP"
+.BR \-t ", " \-\-truncate
+.RI "[ " size " ]"
 ]
 [
-.BI "\-s\fP, \fB\-\-sourcedir" " source"
+.BR \-s ", " \-\-sourcedir
+.I source
 ]
 [
-.BI "\-d\fP, \fB\-\-destdir" " destination"
+.BR \-d ", " \-\-destdir
+.I destination
 ]
 [
-.BI "\-i\fP, \fB\-\-icudatadir" " directory"
+.BR \-i ", " \-\-icudatadir
+.I directory
 ]
 [
-.BI "\-c\fP, \fB\-\-to\-stdout"
+.BR \-c ", " \-\-to\-stdout
 ]
-.IR bundle " \.\.\."
+.IR bundle " .\|.\|."
 .SH DESCRIPTION
 .B derb
 reads the compiled resource
@@ -50,14 +55,14 @@ reads the compiled resource
 files passed on the command line and write them back in text form.
 The resulting text files have a
 .B .txt
-extension while compiled resource bundle source files typically have a 
+extension while compiled resource bundle source files typically have a
 .B .res
 extension.
 .PP
 It is customary to name the resource bundles by their locale name,
-i.e. to use a local identifier for the
+i.e., to use a local identifier for the
 .I bundle
-filename, e.g.
+filename, e.g.,
 .B ja_JP.res
 for Japanese (Japan) data, or
 .B root.res
@@ -68,40 +73,44 @@ since the locale name is not accessible
 resource bundle, and to know which locale to ask for when opening
 the bundle.
 .B derb
-will produce a file whose base name is the base name of the compiled resource 
file itself.
+will produce a file
+whose base name is the base name of the compiled resource file itself.
 If the
-.BI "\-\-to\-stdout\fP, \fB\-c\fP"
+.BR \-\-to\-stdout ", " \-c
 option is used, however, the text will be written on the standard output.
 .SH OPTIONS
 .TP
-.BR "\-h\fP, \fB\-?\fP, \fB\-\-help"
+.BR \-h ", " \-? ", " \-\-help
 Print help about usage and exit.
 .TP
-.BR "\-V\fP, \fB\-\-version"
+.BR \-V ", " \-\-version
 Print the version of
 .B derb
 and exit.
 .TP
-.BR "\-v\fP, \fB\-\-verbose"
+.BR \-v ", " \-\-verbose
 Display extra informative messages during execution.
 .TP
-.BR "\-A\fP, \fB\-\-suppressAliases"
+.BR \-A ", " \-\-suppressAliases
 Don't follow aliases when producing output.
 .TP
 .BI "\-e\fP, \fB\-\-encoding" " encoding"
 Set the encoding used to write output files to
 .IR encoding .
-The default encoding is the invariant (subset of ASCII or EBCDIC)
-codepage for the system (see section
+The default encoding is the invariant
+(subset of ASCII or EBCDIC)
+codepage for the system
+(see section
 .BR "INVARIANT CHARACTERS" ).
-The choice of the encoding does not affect the data, just their
-representation. Characters that cannot be represented in the
+The choice of the encoding does not affect the data,
+just their representation.
+Characters that cannot be represented in the
 .I encoding
 will be represented using
 .BI \eu "hhhh"
 escape sequences.
 .TP
-.BI "\-\-bom"
+.B \-\-bom
 Write a byte order mark (BOM) at the beginning of the file.
 .TP
 .BI "\-l\fP, \fB\-\-locale" " locale"
@@ -111,11 +120,14 @@ for the resource bundle, which is used b
 as the base name of the output file.
 .TP
 .BI "\-t\fP, \fB\-\-truncate" " \fR[ \fPsize\fR ]\fP"
-Truncate individual resources (strings or binary data) to
+Truncate individual resources
+(strings or binary data)
+to
 .I size
-bytes. The default if
+bytes.
+The default, if
 .I size
-is not specified is
+is not specified, is
 .B 80
 bytes.
 .TP
@@ -123,17 +135,17 @@ bytes.
 Set the source directory to
 .IR source .
 The default source directory is the current directory.
-If 
+If
 .B -
 is passed for
 .IR source ,
 then the
 .I bundle
 will be looked for in its default location, specified by
-the 
+the
 .B ICU_DATA
 environment variable (or defaulting to
-the location set when ICU was built if 
+the location set when ICU was built if
 .B ICU_DATA
 is not set).
 .TP
@@ -142,7 +154,7 @@ Set the destination directory to
 .IR destination .
 The default destination directory is specified by the environment variable
 .BR ICU_DATA
-or is the location set when ICU was built if 
+or is the location set when ICU was built if
 .B ICU_DATA
 is not set.
 .TP
@@ -179,10 +191,12 @@ This is the set which is guaranteed to b
 .SH ENVIRONMENT
 .TP 10
 .B ICU_DATA
-Specifies the directory containing ICU data. Defaults to
+Specifies the directory containing ICU data.
+Defaults to
 .BR ${prefix}/share/icu/72.1/ .
-Some tools in ICU depend on the presence of the trailing slash. It is thus
-important to make sure that it is present if
+Some tools in ICU depend on the presence of the trailing slash.
+It is thus important to make sure that it is present
+if
 .B ICU_DATA
 is set.
 .SH AUTHORS
@@ -192,7 +206,7 @@ Yves Arrouye
 .SH VERSION
 1.0
 .SH COPYRIGHT
-Copyright (C) 2002 IBM, Inc. and others.
+Copyright (C) 2002 IBM, Inc.\& and others.
 .SH SEE ALSO
 .BR genrb (1)
 

Reply via email to