Ports options ask the user to make a decision on whether to enable that
option. Option descriptions are critical for this, giving the user
information to help them make that decision.
Unfortunately, what is clear to the porter is often not clear to a user.
The Porter's Handbook says "Do not just repeat the name", but this still
happens, either exactly, or with a description that adds no information.
For example:
XYZ Enable XYZ
The description here adds no information. The name of the option itself
tells the reader that this is for enabling or disabling a feature. The
option asks them to make a decision, whether to enable that option or
not, or even just to leave it at the default, but does not give them any
help in making that decision. Let's improve that:
XYZ Include protocols for use with XYZ servers
This gives the reader some additional details.
Because so many of the option descriptions have predictable
no-added-information styles, it is possible to write a program that
detects these. In the process of doing that, I found some actual bugs in
descriptions that were not caught by other parts of the ports build or
portlint.
The program is called optcheck and can be found here:
http://www.wonkity.com/~wblock/tmp/optcheck/
The readme.txt explains a little more, and optcheck-output.txt is a full
run against the ports tree from a couple of weeks ago.
The tests are just some that I came up with quickly, and can certainly
be improved. More can be added, and they can make better suggestions.
Ultimately, the hope is that this functionality will be added to
portlint or somewhere else that would help prevent these types of
pointless descriptions.
For usage, run
optcheck -h
For a run against the full ports tree, use just
optcheck
To run against a category or single port directory, use -d:
optcheck -d /usr/ports/devel
optcheck -d /usr/ports/print/ghostscript9-base
_______________________________________________
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"