Date: Fri, 16 Sep 2016 09:52:42 -0600 (MDT) From: Warren Block <wblock@wonkity.com> To: ports@FreeBSD.org Subject: Checking port option descriptions Message-ID: <alpine.BSF.2.20.1609160951090.12548@wonkity.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.20.1609160951090.12548>