ports/183438: gindent "-linux" option causes program exit
Wietse Venema
wietse at porcupine.org
Tue Oct 29 13:10:00 UTC 2013
>Number: 183438
>Category: ports
>Synopsis: gindent "-linux" option causes program exit
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Oct 29 13:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Wietse Venema
>Release: 9.1
>Organization:
>Environment:
FreeBSD bristle.watson.ibm.com 9.1-RELEASE FreeBSD 9.1-RELEASE #10: Tue Sep 10 17:11:26 EDT 2013 root at bristle.watson.ibm.com:/usr/src/sys/amd64/compile/GENERIC amd64
>Description:
gindent is a cross-platform code formatter for C-like program source code.
The *BSD port of the GNU indent command (FreeBSD gindent-2.2.10_2 port) errors out when the '-linux' command-line option is specified.
This is a symptom of a larger problem: someone tweaked a dozen or so of gindent's documented default settings, breaking existing documented behavior, without even updating the gindent manpage.
See for example: http://www.monkey.org/openbsd/archive/ports/0208/msg00247.html
>How-To-Repeat:
Without the -linux option, no error:
$ echo '' | /usr/local/bin/gindent
$
With the -linux option, error:
$ echo '' | /usr/local/bin/gindent -linux
command line: option ``-il1'' requires a numeric parameter
$
The -linux option breaks because the lower-level "il1" option is broken. I have not investigated what other options may be affected.
>Fix:
Don't break existing gindent features when adding a "new" profile such as "knf". Update a manpage when you change a program's default settings. Especially with cross-platform programs that people rely on to work consistently.
Patch attached with submission follows:
Unfortunately this web browser cannot un-attach a file.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list