Package: valgrind
Version: 1:3.24.0-2
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?

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

troff:<stdin>:58: warning: trailing space in the line
troff:<stdin>:86: warning: trailing space in the line
troff:<stdin>:93: warning: trailing space in the line
troff:<stdin>:99: warning: trailing space in the line
troff:<stdin>:104: warning: trailing space in the line
troff:<stdin>:109: warning: trailing space in the line
troff:<stdin>:114: 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.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 valgrind depends on:
ii  libc6      2.40-7
ii  libc6-dbg  2.40-7

Versions of packages valgrind recommends:
ii  gdb           16.2-2
ii  python3       3.13.2-1
pn  valgrind-dbg  <none>

Versions of packages valgrind suggests:
pn  kcachegrind   <none>
pn  valgrind-mpi  <none>

-- no debconf information
Input file is callgrind_annotate.1

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

      1 input text line longer than 80 bytes: Annotate all source ...
      1 input text line longer than 80 bytes: Optionally, each eve...
      1 input text line longer than 80 bytes: When enabled, a perc...
      2 input text line longer than 80 bytes: callgrind_annotate s...
      1 input text line longer than 80 bytes: takes an output file...
      4 skipping paragraph macro: PP after SH

-.-.

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

      7 trailing space in the line

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

-.-.

Show if docman-to-man created this.

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

Is the generating software out of date?



4:.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>

-.-.

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"


78:When enabled, a percentage is printed next to all event counts\&. This helps 
gauge the relative importance of each function and line\&.

-.-.

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 10, length 83

.TH "CALLGRIND ANNOTATE" "1" "01/22/2025" "Release 3\&.24\&.0" 
"callgrind_annotate"

Line 34, length 95

\fBcallgrind_annotate\fR [\fIoptions\fR] [\fIcallgrind\-out\-file\fR\ 
[\fIsource\-files\fR...]]

Line 38, length 116

takes an output file produced by the Valgrind tool Callgrind and prints the 
information in an easy\-to\-read form\&.

Line 60, length 160

callgrind_annotate stops printing functions when the sum of the cost percentage 
of the printed functions is bigger or equal to the given threshold percentage\&.

Line 67, length 116

Optionally, each event is followed by a : and a threshold, to specify different 
thresholds depending on the event\&.

Line 69, length 186

callgrind_annotate stops printing functions when the sum of the cost percentage 
of the printed functions for all the events is bigger or equal to the given 
event threshold percentages\&.

Line 78, length 135

When enabled, a percentage is printed next to all event counts\&. This helps 
gauge the relative importance of each function and line\&.

Line 83, length 93

Annotate all source files containing functions that helped reach the event 
count threshold\&.


-.-.

The name of a man page is typeset in bold and the section in roman
(see man-pages(7)).

109:valgrind(1),

-.-.

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


callgrind_annotate.1:58:Percentage of counts (of primary sort event) we are 
interested in\&.

-.-.

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'".


10:.TH "CALLGRIND ANNOTATE" "1" "01/22/2025" "Release 3\&.24\&.0" 
"callgrind_annotate"
38:takes an output file produced by the Valgrind tool Callgrind and prints the 
information in an easy\-to\-read form\&.
43:Show summary of options\&.
48:Show version of callgrind_annotate\&.
53:Only show figures for events A,B,C\&.
58:Percentage of counts (of primary sort event) we are interested in\&.
60:callgrind_annotate stops printing functions when the sum of the cost 
percentage of the printed functions is bigger or equal to the given threshold 
percentage\&.
65:Sort columns by events A,B,C [event column order]\&.
67:Optionally, each event is followed by a : and a threshold, to specify 
different thresholds depending on the event\&.
69:callgrind_annotate stops printing functions when the sum of the cost 
percentage of the printed functions for all the events is bigger or equal to 
the given event threshold percentages\&.
73:is ignored\&.
78:When enabled, a percentage is printed next to all event counts\&. This helps 
gauge the relative importance of each function and line\&.
83:Annotate all source files containing functions that helped reach the event 
count threshold\&.
88:Print N lines of context before and after annotated lines\&.
93:Add subroutine costs to functions calls\&.
98:Print for each function their callers, the called functions or both\&.
105:to the list of directories to search for source files\&.
110:$INSTALL/share/doc/valgrind/html/index\&.html
112:http://www\&.valgrind\&.org/docs/manual/index\&.html\&;.
115:Josef Weidendorfer <Josef\&.Weidendorfer@gmx\&.de>\&.
117:This manual page was written by Philipp Frauenfelder 
<pfrauenf@debian\&.org>\&.

-.-.

Use ".na" (no adjustment) instead of ".ad l" (and ".ad" to begin the
same adjustment again as before).

26:.ad l

-.-.

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

30:.SH "NAME"
32:.SH "SYNOPSIS"
35:.SH "DESCRIPTION"
39:.SH "OPTIONS"
107:.SH "SEE ALSO"
113:.SH "AUTHOR"

-.-.

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

troff:<stdin>:56: warning: trailing space in the line
troff:<stdin>:76: warning: trailing space in the line
troff:<stdin>:81: warning: trailing space in the line
troff:<stdin>:86: warning: trailing space in the line
troff:<stdin>:91: warning: trailing space in the line
troff:<stdin>:96: warning: trailing space in the line
troff:<stdin>:101: warning: trailing space in the line

-.-.

Generally:

Split (sometimes) lines after a punctuation mark; before a conjunction.
--- callgrind_annotate.1        2025-03-03 18:25:41.184236227 +0000
+++ callgrind_annotate.1.new    2025-03-03 18:44:43.212439075 +0000
@@ -7,7 +7,7 @@
 .\"    Source: Release 3.24.0
 .\"  Language: English
 .\"
-.TH "CALLGRIND ANNOTATE" "1" "01/22/2025" "Release 3\&.24\&.0" 
"callgrind_annotate"
+.TH "CALLGRIND ANNOTATE" 1 01/22/2025 "Release 3.24.0" callgrind_annotate
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -23,95 +23,104 @@
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
-.ad l
+.na
 .\" -----------------------------------------------------------------
 .\" * MAIN CONTENT STARTS HERE *
 .\" -----------------------------------------------------------------
-.SH "NAME"
+.SH NAME
 callgrind_annotate \- post\-processing tool for the Callgrind
-.SH "SYNOPSIS"
+.SH SYNOPSIS
 .HP \w'\fBcallgrind_annotate\fR\ 'u
-\fBcallgrind_annotate\fR [\fIoptions\fR] [\fIcallgrind\-out\-file\fR\ 
[\fIsource\-files\fR...]]
-.SH "DESCRIPTION"
-.PP
+\fBcallgrind_annotate\fR [\fIoptions\fR] [\fIcallgrind\-out\-file\fR\ \
+[\fIsource\-files\fR...]]
+.SH DESCRIPTION
 \fBcallgrind_annotate\fR
-takes an output file produced by the Valgrind tool Callgrind and prints the 
information in an easy\-to\-read form\&.
-.SH "OPTIONS"
-.PP
+takes an output file produced by the Valgrind tool Callgrind
+and prints the information in an easy\-to\-read form.
+.SH OPTIONS
 \fB\-h \-\-help\fR
 .RS 4
-Show summary of options\&.
+Show summary of options.
 .RE
 .PP
 \fB\-\-version\fR
 .RS 4
-Show version of callgrind_annotate\&.
+Show version of callgrind_annotate.
 .RE
 .PP
 \fB\-\-show=A,B,C [default: all]\fR
 .RS 4
-Only show figures for events A,B,C\&.
+Only show figures for events A,B,C.
 .RE
 .PP
-\fB\-\-threshold=<0\-\-100> [default: 99%] \fR
+\fB\-\-threshold=<0\-\-100> [default: 99%]\fR
 .RS 4
-Percentage of counts (of primary sort event) we are interested in\&.
+Percentage of counts
+(of primary sort event)
+we are interested in.
 .sp
-callgrind_annotate stops printing functions when the sum of the cost 
percentage of the printed functions is bigger or equal to the given threshold 
percentage\&.
+callgrind_annotate stops printing functions
+when the sum of the cost percentage of the printed functions is bigger
+or equal to the given threshold percentage.
 .RE
 .PP
 \fB\-\-sort=A,B,C\fR
 .RS 4
-Sort columns by events A,B,C [event column order]\&.
+Sort columns by events A,B,C [event column order].
 .sp
-Optionally, each event is followed by a : and a threshold, to specify 
different thresholds depending on the event\&.
+Optionally,
+each event is followed by a : and a threshold,
+to specify different thresholds depending on the event.
 .sp
-callgrind_annotate stops printing functions when the sum of the cost 
percentage of the printed functions for all the events is bigger or equal to 
the given event threshold percentages\&.
+callgrind_annotate stops printing functions
+when the sum of the cost percentage of the printed functions for all the
+events is bigger or equal to the given event threshold percentages.
 .sp
 When one or more thresholds are given via this option, the value of
 \fB\-\-threshold\fR
-is ignored\&.
+is ignored.
 .RE
 .PP
-\fB\-\-show\-percs=<no|yes> [default: no] \fR
+\fB\-\-show\-percs=<no|yes> [default: no]\fR
 .RS 4
-When enabled, a percentage is printed next to all event counts\&. This helps 
gauge the relative importance of each function and line\&.
+When enabled,
+a percentage is printed next to all event counts.
+This helps gauge the relative importance of each function and line.
 .RE
 .PP
-\fB\-\-auto=<yes|no> [default: yes] \fR
+\fB\-\-auto=<yes|no> [default: yes]\fR
 .RS 4
-Annotate all source files containing functions that helped reach the event 
count threshold\&.
+Annotate all source files containing functions
+that helped reach the event count threshold.
 .RE
 .PP
-\fB\-\-context=N [default: 8] \fR
+\fB\-\-context=N [default: 8]\fR
 .RS 4
-Print N lines of context before and after annotated lines\&.
+Print N lines of context before and after annotated lines.
 .RE
 .PP
-\fB\-\-inclusive=<yes|no> [default: no] \fR
+\fB\-\-inclusive=<yes|no> [default: no]\fR
 .RS 4
-Add subroutine costs to functions calls\&.
+Add subroutine costs to functions calls.
 .RE
 .PP
-\fB\-\-tree=<none|caller|calling|both> [default: none] \fR
+\fB\-\-tree=<none|caller|calling|both> [default: none]\fR
 .RS 4
-Print for each function their callers, the called functions or both\&.
+Print for each function their callers, the called functions or both.
 .RE
 .PP
-\fB\-I, \-\-include=<dir> \fR
+\fB\-I, \-\-include=<dir>\fR
 .RS 4
 Add
 \fBdir\fR
-to the list of directories to search for source files\&.
+to the list of directories to search for source files.
 .RE
-.SH "SEE ALSO"
-.PP
-valgrind(1),
-$INSTALL/share/doc/valgrind/html/index\&.html
+.SH SEE ALSO
+.BR valgrind (1),
+$INSTALL/share/doc/valgrind/html/index.html
 or
-http://www\&.valgrind\&.org/docs/manual/index\&.html\&;.
-.SH "AUTHOR"
-.PP
-Josef Weidendorfer <Josef\&.Weidendorfer@gmx\&.de>\&.
+http://www.valgrind.org/docs/manual/index.html.
+.SH AUTHOR
+Josef Weidendorfer <josef.weidendor...@gmx.de>.
 .PP
-This manual page was written by Philipp Frauenfelder <pfrauenf@debian\&.org>\&.
+This manual page was written by Philipp Frauenfelder <pfrau...@debian.org>.
  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