-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically generated documentation for configuration options confuses users into using curly braces #31
Comments
The reason for using I do not like proposal 1 because it is easy to miss, does not nicely handle the case of an empty list, and I am actually not sure whether a trailing comma is allowed. Proposals 3 to 5 would make sense if the information is correctly present for all kinds of values that we currently support, and if it turns out to not be irrelevant in most cases. Otherwise I would suggest proposal 2. Note that the code already supports printing a verbose version of the option list, which currently looks like this:
|
Cool feature, any chance you can tell my how I can output this? (I could search myself, but it looks like you already know how to do this). The question is why the default value is still printed as |
For CPAchecker, you can un-comment the line |
If you use CPAchecker, you can just add |
This came up here:
https://gitlab.com/sosy-lab/software/cpachecker/-/issues/578#note_412755260
Currently e.g. configuration options with
ImmutableList.of()
as default value are printed asmyoption={}
in the compiled documentation of configuration options. If the default value for a option is a non-empty collection, it will look like this:This leads to users expecting to be able to input curly braces when they specify a specific value for such an option.
In this case there also appears java code, which leads user's to think that they might also provide this.
Ideally the type information is conveyed in the documentation in a less confusing manner.
Let's take for example:
Here if we omit the
{}
it looks fine, that command could also be written like that in a configuration. But then of course the user loses the type information (the fact that the option is fine with more than one string, separated by commas).For other kinds of option we already provide information about the argument type, e.g.:
One proposal how to solve this would be to specify a option that is backed by a collection with a trailing comma:
But I find that rather ugly. Another proposal would be to provide the type information in an extra line (much like with enums):
Yet another way to do it completely different would be to use explicitly state the grammar/structure/type that is expected as value:
or the other way around:
Maybe we can also provide more semantic type information, e.g. for
slicing.conditionFiles
something like:The text was updated successfully, but these errors were encountered: