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? troff:<stdin>:41: warning: trailing space in the line troff:<stdin>:46: warning: trailing space in the line troff:<stdin>:51: warning: trailing space in the line troff:<stdin>:73: warning: trailing space in the line troff:<stdin>:79: warning: trailing space in the line troff:<stdin>:84: warning: trailing space in the line troff:<stdin>:89: warning: trailing space in the line troff:<stdin>:94: warning: trailing space in the line troff:<stdin>:99: 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 cg_annotate.1 Output from "mandoc -T lint cg_annotate.1": (shortened list) Remove trailing space with: sed -e 's/ *$//' 1 input text line longer than 80 bytes: Sets the significanc... 1 input text line longer than 80 bytes: Specifies the events... 1 input text line longer than 80 bytes: Specifies which even... 1 input text line longer than 80 bytes: The number of lines ... 1 input text line longer than 80 bytes: When enabled, a perc... 1 input text line longer than 80 bytes: search\-and\-replace... 1 input text line longer than 80 bytes: takes one or more Ca... 4 skipping paragraph macro: PP after SH -.-. Output from "test-groff -mandoc -t -ww -z cg_annotate.1": (shortened list) Remove trailing space with: sed -e 's/ *$//' 9 trailing space in the line -.-. 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" [List of affected lines removed.] -.- 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. [List of affected lines removed.] -.- The name of a man page is typeset in bold and the section in roman (see man-pages(7)). 105:valgrind(1), -.-. Put a parenthetical sentence, phrase on a separate line, if not part of a code. See man-pages(7), item "semantic newline". [List of affected lines removed.] -.- 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 "CG_ANNOTATE" "1" "01/22/2025" "Release 3\&.24\&.0" "cg_annotate" 38:takes one or more Cachegrind output files and prints data about the profiled program in an easy\-to\-read form\&. 43:Show the help message\&. 48:Show the version number\&. 53:Diff two Cachegrind output files\&. 60:search\-and\-replace expression that is applied to all filenames\&. Useful when differencing, for removing minor differences in paths between two different versions of a program that are sitting in different directories\&. An 64:suffix makes it match multiple times\&. 70:\fB\-\-mod\-filename\fR, but for filenames\&. Useful for removing minor differences in randomized names of auto\-generated functions generated by some compilers\&. 75:Specifies which events to show (and the column order)\&. Default is to use all present in the Cachegrind output file (and use the order in the file)\&. Best used in conjunction with 76:\fB\-\-sort\fR\&. 81:Specifies the events upon which the sorting of the file:function and function:file entries will be based\&. 84:\fB\-\-threshold=X [default: 0\&.1%] \fR 86:Sets the significance threshold for the file:function and function:files sections\&. A file or function is shown if it accounts for more than X% of the counts for the primary sort event\&. If annotating source files, this also affects which files are annotated\&. 91:When enabled, a percentage is printed next to all event counts\&. This helps gauge the relative importance of each function and line\&. 96:Enables or disables source file annotation\&. 101:The number of lines of context to show before and after each annotated line\&. Use a large number (e\&.g\&. 100000) to show all source lines\&. 106:$INSTALL/share/doc/valgrind/html/index\&.html 108:http://www\&.valgrind\&.org/docs/manual/index\&.html\&. 111:Nicholas Nethercote\&. -.-. 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" 103:.SH "SEE ALSO" 109:.SH "AUTHOR" -.-. Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z ": troff:<stdin>:41: warning: trailing space in the line troff:<stdin>:46: warning: trailing space in the line troff:<stdin>:51: warning: trailing space in the line troff:<stdin>:73: warning: trailing space in the line troff:<stdin>:79: warning: trailing space in the line troff:<stdin>:84: warning: trailing space in the line troff:<stdin>:89: warning: trailing space in the line troff:<stdin>:94: warning: trailing space in the line troff:<stdin>:99: warning: trailing space in the line -.-. Generally: Split (sometimes) lines after a punctuation mark; before a conjunction.
--- cg_annotate.1 2025-03-03 19:54:13.661374031 +0000 +++ cg_annotate.1.new 2025-03-03 20:22:34.400660700 +0000 @@ -7,7 +7,7 @@ .\" Source: Release 3.24.0 .\" Language: English .\" -.TH "CG_ANNOTATE" "1" "01/22/2025" "Release 3\&.24\&.0" "cg_annotate" +.TH CG_ANNOTATE 1 01/22/2025 "Release 3.24.0" cg_annotate .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -23,89 +23,85 @@ .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) -.ad l +.na .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.SH "NAME" +.SH NAME cg_annotate \- post\-processing tool for Cachegrind -.SH "SYNOPSIS" +.SH SYNOPSIS .HP \w'\fBcg_annotate\fR\ 'u \fBcg_annotate\fR [\fIoptions\fR] \fIcachegrind\-out\-file\fR [\fIsource\-files\fR...] -.SH "DESCRIPTION" -.PP +.SH DESCRIPTION \fBcg_annotate\fR -takes one or more Cachegrind output files and prints data about the profiled program in an easy\-to\-read form\&. -.SH "OPTIONS" -.PP -\fB\-h \-\-help \fR +takes one or more Cachegrind output files and prints data about the profiled program in an easy\-to\-read form\. +.SH OPTIONS +\fB\-h \-\-help\fR .RS 4 -Show the help message\&. +Show the help message\. .RE .PP -\fB\-\-version \fR +\fB\-\-version\fR .RS 4 -Show the version number\&. +Show the version number\. .RE .PP -\fB\-\-diff \fR +\fB\-\-diff\fR .RS 4 -Diff two Cachegrind output files\&. +Diff two Cachegrind output files\. .RE .PP \fB\-\-mod\-filename <regex> [default: none]\fR .RS 4 Specifies an \fBs/old/new/\fR -search\-and\-replace expression that is applied to all filenames\&. Useful when differencing, for removing minor differences in paths between two different versions of a program that are sitting in different directories\&. An +search\-and\-replace expression that is applied to all filenames\. Useful when differencing, for removing minor differences in paths between two different versions of a program that are sitting in different directories\. An \fBi\fR suffix makes the regex case\-insensitive, and a \fBg\fR -suffix makes it match multiple times\&. +suffix makes it match multiple times\. .RE .PP \fB\-\-mod\-funcname <regex> [default: none]\fR .RS 4 Like -\fB\-\-mod\-filename\fR, but for filenames\&. Useful for removing minor differences in randomized names of auto\-generated functions generated by some compilers\&. +\fB\-\-mod\-filename\fR, but for filenames\. Useful for removing minor differences in randomized names of auto\-generated functions generated by some compilers\. .RE .PP -\fB\-\-show=A,B,C [default: all, using order in the Cachegrind output file] \fR +\fB\-\-show=A,B,C [default: all, using order in the Cachegrind output file]\fR .RS 4 -Specifies which events to show (and the column order)\&. Default is to use all present in the Cachegrind output file (and use the order in the file)\&. Best used in conjunction with -\fB\-\-sort\fR\&. +Specifies which events to show (and the column order)\. Default is to use all present in the Cachegrind output file (and use the order in the file)\. Best used in conjunction with +\fB\-\-sort\fR\. .RE .PP -\fB\-\-sort=A,B,C [default: order in the Cachegrind output file] \fR +\fB\-\-sort=A,B,C [default: order in the Cachegrind output file]\fR .RS 4 -Specifies the events upon which the sorting of the file:function and function:file entries will be based\&. +Specifies the events upon which the sorting of the file:function and function:file entries will be based\. .RE .PP -\fB\-\-threshold=X [default: 0\&.1%] \fR +\fB\-\-threshold=X [default: 0\.1%]\fR .RS 4 -Sets the significance threshold for the file:function and function:files sections\&. A file or function is shown if it accounts for more than X% of the counts for the primary sort event\&. If annotating source files, this also affects which files are annotated\&. +Sets the significance threshold for the file:function and function:files sections\. A file or function is shown if it accounts for more than X% of the counts for the primary sort event\. If annotating source files, this also affects which files are annotated\. .RE .PP -\fB\-\-show\-percs, \-\-no\-show\-percs, \-\-show\-percs=<no|yes> [default: yes] \fR +\fB\-\-show\-percs, \-\-no\-show\-percs, \-\-show\-percs=<no|yes> [default: yes]\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\-\-annotate, \-\-no\-annotate, \-\-auto=<no|yes> [default: yes] \fR +\fB\-\-annotate, \-\-no\-annotate, \-\-auto=<no|yes> [default: yes]\fR .RS 4 -Enables or disables source file annotation\&. +Enables or disables source file annotation\. .RE .PP -\fB\-\-context=N [default: 8] \fR +\fB\-\-context=N [default: 8]\fR .RS 4 -The number of lines of context to show before and after each annotated line\&. Use a large number (e\&.g\&. 100000) to show all source lines\&. +The number of lines of context to show before and after each annotated line\. Use a large number (e\.g\. 100000) to show all source lines\. .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 -Nicholas Nethercote\&. +http://www\.valgrind\.org/docs/manual/index\.html\. +.SH AUTHOR +Nicholas Nethercote\.
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) -.-