Open dbaston opened 1 year ago
Are the following reasonable indications of whether something should be documented?
NEWS
(GDAL_OVR_PROPAGATE_NODATA)Are the following reasonable indications of whether something should be documented?
that seems reasonable. I would also add that if a config option is not tested in autotest/ and not documented, it might be a hint that either it shouldn't be documented, or a test should be written.
Some options mentioned in NEWS might have been added out of caution, to enable easy "revert", when a behaviour has been changed. In the good cases where the new behaviour works OK, the config option is actually not needed.
I was thinking about whether it would be a good idea to add a check like this to the CI, but of course it would require some way to ignore options that are not considered public. Some ideas I had:
.rst
files, with a :private: YES
keyword or something to prevent them from being emittedCPLGetConfigOptionPrivate
or something that would wrap CPLGetConfigOption
but emit a warning like "Option XYZ is for development/testing purposes and may be removed without notice in a future release"I was thinking about whether it would be a good idea to add a check like this to the CI, but of course it would require some way to ignore options that are not considered public
Options 1 or 2 would seem fine to me. I feel less the CPLGetConfigOptionPrivate(), especially the warning part, since production code does call it. Or maybe you meant to emit the warning only if the option is defined?
Or maybe you meant to emit the warning only if the option is defined?
Yes, that's what I meant.
I used a throwaway script to look for configuration options that are read by
CPLGetConfigOption
but are not declared in the.rst
documentation files. Some of these do not appear to be intended to be part of the public API (PG_USE_POSTGIS2_OPTIM
), some may be superseded by open options/creation options, and others may simply be missing the.. config::
magic. Others could be added to driver pages or the global options page where appropriate.The script:
Current output: