Package: girepository-tools
Version: 2.83.4-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:<stdin>:30: style: .TH missing third argument; consider document 
modification date in ISO 8601 format (YYYY-MM-DD)
an.tmac:<stdin>:30: style: .TH missing fourth argument; consider 
package/project name and version (e.g., "groff 1.23.0")
troff:<stdin>:59: warning: trailing space in the line
troff:<stdin>:100: warning: trailing space in the line
an.tmac:<stdin>:103: style: 1 leading space(s) on input line
troff:<stdin>:103: 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 girepository-tools depends on:
ii  libc6                  2.40-7
ii  libffi8                3.4.7-1
ii  libgirepository-2.0-0  2.83.4-1
ii  libglib2.0-0t64        2.83.4-1
ii  native-architecture    0.2.6

girepository-tools recommends no packages.

girepository-tools suggests no packages.

-- no debconf information
Input file is gi-compile-repository.1

Output from "mandoc -T lint  gi-compile-repository.1": (shortened list)

      1 input text line longer than 80 bytes: gi\-compile\-reposit...
      1 missing date, using "": TH
      5 skipping paragraph macro: sp after SH
      3 whitespace at end of input line

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

-.-.

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

      3 trailing space in the line

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

-.-.

Show if generated from reStructuredText.

Who is actually generating this man page?  Debian or upstream?

Is the generating software out of date?

1:.\" Man page generated from reStructuredText.

-.-.

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

3

-.-.

Reduce space between words.

gi-compile-repository.1:59:Please see  
<file:///usr/share/doc/gobject\-introspection/README.Debian.gz> 
gi-compile-repository.1:100:Report bugs at  
<https://gitlab.gnome.org/GNOME/glib/\-/issues> 

-.-.

Remove space in the first column, if not indented.
Use ".in +<number>n" and ".in" to end it; ".nf" and ".fi" to end
it, for an extra indention.

gi-compile-repository.1:103: <https://gi.readthedocs.io/> 

-.-.

Strings longer than 3/4 of a standard line length (80)
Use "\:" to split the string at the end of an output line, for example a
long URL (web address)

59 Please see  <file:///usr/share/doc/gobject\-introspection/README.Debian.gz> 

-.-.

Wrong distance (not two spaces) 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"

84:found. The name of the library should not contain the ending shared

-.-.

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.
Add "\:" to split the string for the output, "\<newline>" in the source.  

Line 49, length 81

gi\-compile\-repository converts one or more GIR files into one or more 
typelibs.


-.-.

No need for '\&' to be in front of a period (.),
if there is a character in front of it.

Remove with "sed -e 's/\\&\././g'".


56:\fBarm\-linux\-gnueabihf\-gi\-compile\-repository\fP\&.
68:Save the resulting output in \fIFILENAME\fP\&.

-.-.

One space only after a possible end of sentence
(after a punctuation, that
can end a sentence).

gi-compile-repository.1:84:found. The name of the library should not contain 
the ending shared

-.-.

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

gi-compile-repository.1:53:On Debian\-derived systems, each architecture 
provides a version of
gi-compile-repository.1:55:\fBdpkg\-architecture\fP(1), for example
gi-compile-repository.1:58:given architecture, and should be used when 
cross\-compiling.
gi-compile-repository.1:86:This option can be used more than once, for typelibs 
that describe

-.-.

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.

gi-compile-repository.1:30:.TH "GI-COMPILE-REPOSITORY" "1" "" ""

-.-.

Put a (long) web address on a new line to reduce the posibility of
splitting the address between two output lines.
Or inhibit hyphenation with "\%" in front of the name.


100:Report bugs at  <https://gitlab.gnome.org/GNOME/glib/\-/issues> 
103: <https://gi.readthedocs.io/> 

-.-.

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

an.tmac:<stdin>:30: style: .TH missing third argument; consider document 
modification date in ISO 8601 format (YYYY-MM-DD)
an.tmac:<stdin>:30: style: .TH missing fourth argument; consider 
package/project name and version (e.g., "groff 1.23.0")
troff:<stdin>:59: warning: trailing space in the line
troff:<stdin>:100: warning: trailing space in the line
an.tmac:<stdin>:103: style: 1 leading space(s) on input line
troff:<stdin>:103: warning: trailing space in the line

-.-.

Generally:

Split (sometimes) lines after a punctuation mark; before a conjunction.
--- gi-compile-repository.1     2025-03-13 00:43:17.419823022 +0000
+++ gi-compile-repository.1.new 2025-03-13 01:38:46.418658277 +0000
@@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2
 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
 ..
-.TH "GI-COMPILE-REPOSITORY" "1" "" ""
+.TH GI-COMPILE-REPOSITORY 1 "" ""
 .SH NAME
 gi-compile-repository \- Typelib compiler
 .\" This has to be duplicated from above to make it machine-readable by 
`reuse`:
@@ -42,51 +42,58 @@ gi-compile-repository \- Typelib compile
 .\" SPDX-License-Identifier: LGPL-2.1-or-later
 .
 .SH SYNOPSIS
-.sp
 \fBgi\-compile\-repository\fP [\fIOPTION\fP…] \fIGIRFILE\fP
 .SH DESCRIPTION
-.sp
-gi\-compile\-repository converts one or more GIR files into one or more 
typelibs.
+gi\-compile\-repository converts one
+or more GIR files into one
+or more typelibs.
 The output will be written to standard output unless the \fB\-\-output\fP is
 specified.
 .sp
-On Debian\-derived systems, each architecture provides a version of
+On Debian\-derived systems,
+each architecture provides a version of
 \fBgi\-compile\-repository\fP prefixed with the \fIDEB_HOST_GNU_TYPE\fP from
-\fBdpkg\-architecture\fP(1), for example
-\fBarm\-linux\-gnueabihf\-gi\-compile\-repository\fP\&.
+\fBdpkg\-architecture\fP(1),
+for example
+\fBarm\-linux\-gnueabihf\-gi\-compile\-repository\fP.
 These architecture\-prefixed names use appropriate search paths for the
-given architecture, and should be used when cross\-compiling.
-Please see  <file:///usr/share/doc/gobject\-introspection/README.Debian.gz> 
+given architecture,
+and should be used when cross\-compiling.
+Please see
+.br
+<file:///usr/share/doc/gobject\-introspection/README.Debian.gz>
 for more details.
 .SH OPTIONS
 .INDENT 0.0
 .TP
-.B \fB\-\-help\fP
+.B \-\-help
 Show help options.
 .TP
-.B \fB\-\-output\fP \fIFILENAME\fP, \fB\-o\fP \fIFILENAME\fP
-Save the resulting output in \fIFILENAME\fP\&.
+.BI \-\-output " FILENAME\fR, " \-o " FILENAME"
+Save the resulting output in \fIFILENAME\fP.
 .TP
-.B \fB\-\-verbose\fP
+.B \-\-verbose
 Show verbose messages.
 .TP
-.B \fB\-\-debug\fP
+.B \-\-debug
 Show debug messages.
 .TP
-.B \fB\-\-includedir\fP \fIDIRECTORY\fP
+.BI \-\-includedir " DIRECTORY"
 Add \fIDIRECTORY\fP to the search path for GIR XML.
 This option can be used more than once.
 The first \fIDIRECTORY\fP on the command\-line will be searched first
 (highest precedence).
 .TP
-.B \fB\-\-shared\-library\fP \fIFILENAME\fP, \fB\-l\fP \fIFILENAME\fP
+.BI \-\-shared\-library " FILENAME\fR, " \-l " FILENAME"
 Specifies the shared library where the symbols in the typelib can be
-found. The name of the library should not contain the ending shared
+found.
+The name of the library should not contain the ending shared
 library suffix.
-This option can be used more than once, for typelibs that describe
-more than one shared library.
+This option can be used more than once,
+for typelibs
+that describe more than one shared library.
 .TP
-.B \fB\-\-version\fP
+.B \-\-version
 Show program’s version number and exit.
 .UNINDENT
 .SH EXAMPLE
@@ -96,13 +103,10 @@ Show program’s version number and exit
 $ gi\-compile\-repository \-o Gio\-2.0.typelib /usr/share/gir\-1.0/Gio\-2.0.gir
 .UNINDENT
 .SH BUGS
-.sp
-Report bugs at  <https://gitlab.gnome.org/GNOME/glib/\-/issues> 
+Report bugs at <https://gitlab.gnome.org/GNOME/glib/\-/issues>
 .SH HOMEPAGE AND CONTACT
-.sp
- <https://gi.readthedocs.io/> 
+<https://gi.readthedocs.io/>
 .SH AUTHORS
-.sp
 Matthias Clasen
 .\" Generated by docutils manpage writer.
 .
  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