bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #58016] Add an option "--label=<name>" to show an origin of diagnos


From: G. Branden Robinson
Subject: [bug #58016] Add an option "--label=<name>" to show an origin of diagnostics
Date: Thu, 8 Oct 2020 08:28:57 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Update of bug #58016 (project groff):

                  Status:                    None => Wont Fix               
             Assigned to:                    None => gbranden               
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #5:

I don't think there's anything in this feature request that can't be resolved
by completing work on Savannah #52463, which basically means formatting
diagnostic messages as the GNU Coding Standards recommend.

https://www.gnu.org/prep/standards/html_node/Errors.html#Errors

...to which I would add some enhancements.

The diagnostic level (usually "fatal error", "error", or "warning"), followed
by a colon and space, should be the first component of the "message" as
described by the GNU manual above.

When a preprocessor injects diagnostic-emitting *roff requests into a file it
processes, it is the processed file that is the emitter of the diagnostic, not
the preprocessor.  I recently altered tbl(1) to reflect this principle. 
Commit message shown below.

Finally, as noted in my message closing bug#57630, test-groff is not designed
for use as a system executable.  People can fork it or put a modified copy in
$HOME/bin if they want to, but I think it best serves _groff_ if it remains in
its role as a test tool for the groff build process.

Resolving as wontfix.


commit f75e156b621d3743368c58425f357e6cd52372a0
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Sep 26 10:41:29 2020 +1000

    src/preproc/tbl/table.cpp: Regularize diagnostics.
    
    * src/preproc/tbl/table.cpp (table::init_output):
      (table::compute_expand_width):
      (table::compute_separation_factor): Use consistent format for
      diagnostic messages.
      + Do not spread a single diagnostic across multiple lines.
      + Report messages in GNU Coding Standards format, that is:
      + Report the name of the file the problem is in...
      + ...then the line number...
      + ...then the diagnostic severity level...
      + ...then the specific problem.
    
    Unfortunately source line numbers for tbl(1) tables can get a bit
    approximate and are badly off in some cases (I think it has to do with
    text blocks--I'll be investgating that soon), but that is a separate
    issue.
    
    Continues the long process of fixing Savannah #52463.
    
    Here are examples of output before and after this change. \\ marks lines
    wrapped for the purpose of this commit message.
    
    Before:
    
    $ groff -z -Tps -t -ms diag1-Tps.ms
    warning: file 'diag1-Tps.ms', around line 11:
      table wider than line width
    warning: file 'diag1-Tps.ms', around line 11:
      column separation set to zero
    warning: file 'diag1-Tps.ms', around line 101:
      table wider than line width
    warning: file 'diag1-Tps.ms', around line 96:
      table squeezed horizontally to fit line length
    $ groff -z -Tps -t -man diag2-Tps.man
    error: page 2: table will not fit on one page; use .TS H/.TH with a \\
    supporting macro package
    $ groff -z -Tutf8 -t -man diag3-Tutf8.man
    warning: page 3: table text block will not fit on one page
    warning: page 10: table text block will not fit on one page
    
    Now:
    
    $ ../build/test-groff -z -Tps -t -ms diag1-Tps.ms
    diag1-Tps.ms: around line 11: warning: table wider than line width
    diag1-Tps.ms: around line 11: warning: column separation set to zero
    diag1-Tps.ms: around line 101: warning: table wider than line width
    diag1-Tps.ms: around line 96: warning: table squeezed horizontally to \\
    fit line length
    $ ../build/test-groff -z -Tps -t -man diag2-Tps.man
    diag2-Tps.man: around line 3660: error: table will not fit on page 2; \\
    use .TS H/.TH with a supporting macro package
    $ ../build/test-groff -z -Tutf8 -t -man diag3-Tutf8.man
    diag3-Tutf8.man: around line 536: warning: table text block will not \\
    fit on page 3
    diag3-Tutf8.man: around line 1361: warning: table text block will not \\
    fit on page 10


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58016>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]