doc: kconfig: Encourage using menuconfig as a sanity check

Some people never use the menuconfig, but it makes a good sanity check
when making Kconfig changes, so encourage it for that. Mention a few
things that can be checked in it.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit is contained in:
Ulf Magnusson 2019-03-10 09:58:05 +01:00 committed by Andrew Boie
commit ddf9193934

View file

@ -281,7 +281,7 @@ In summary, here are some recommended practices for ``select``:
``if`` blocks add dependencies to each item within the ``if``, as if ``depends
on`` was used.
A common misunderstanding related to ``if`` is to think that this code
A common misunderstanding related to ``if`` is to think that the following code
conditionally includes the file :file:`Kconfig.other`:
.. code-block:: none
@ -324,6 +324,42 @@ error-prone, since it can be hard to spot that the same dependency is added
twice.
Checking changes in ``menuconfig``
**********************************
When adding new symbols or making other changes to Kconfig files, it is a good
idea to look up the symbols in the :ref:`menuconfig <override_kernel_conf>`
interface afterwards. To get to a symbol quickly, use the menuconfig's jump-to
feature (press :kbd:`/`).
Here are some things to check:
* Are the symbols placed in a good spot? Check that they appear in a menu where
they make sense, close to related symbols.
If one symbol depends on another, then it's often a good idea to place it
right after the symbol it depends on. It will then be shown indented relative
to the symbol it depends on in the ``menuconfig`` interface. This also works
if several symbols are placed after the symbol they depend on.
* Is it easy to guess what the symbols do from their prompts?
* If many symbols are added, do all combinations of values they can be set to
make sense?
For example, if two symbols ``FOO_SUPPORT`` and ``NO_FOO_SUPPORT`` are added,
and both can be enabled at the same time, then that makes a nonsensical
configuration. In this case, it's probably better to have a single
``FOO_SUPPORT`` symbol.
* Are there any duplicated dependencies?
This can be checked by selecting a symbol and pressing :kbd:`?` to view the
symbol information. If there are duplicated dependencies, then use the
``Included via ...`` path shown in the symbol information to figure out where
they come from.
Style recommendations and shorthands
************************************