You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/04/26 15:43:50 UTC

[GitHub] [incubator-nuttx] v01d commented on a change in pull request #3608: docs: Generate documentation from the kconfig files

v01d commented on a change in pull request #3608:
URL: https://github.com/apache/incubator-nuttx/pull/3608#discussion_r620420024



##########
File path: Documentation/_kconfig/helper.jinja
##########
@@ -0,0 +1,56 @@
+{% macro help(sc) -%}
+Help
+====
+{% for node in sc.nodes -%}
+{% if node.help %}
+
+.. parsed-literal::
+
+    {{node.help|indent(4)}}
+{% endif %}
+{% endfor %}
+{%- endmacro %}
+{%- macro direct_dep(sc) -%}
+{% if sc.direct_dep == sc.kconfig.y %}
+{% else %}
+Direct Dependencies
+===================
+
+{{expr_str(sc.direct_dep)}}
+{% endif %}
+{%- endmacro %}
+{%- macro defaults(sc, choice) -%}
+Defaults
+========
+{% if sc.defaults %}
+{%- for value, cond in sc.orig_defaults %}
+- {{expr_str(value)}}{% if cond != sc.kconfig.y %} if {{expr_str(cond)}}{% endif %}
+{%- endfor %}
+{% else %}
+No defaults defined. Implicitly defined to {% if choice %}the first (visible) choice option.{% elif sc.orig_type in [kconfiglib.BOOL, kconfiglib.TRISTATE] %}``n``.{% else %}the empty string.{% endif %}
+{% endif %}
+{%- endmacro %}
+{%- macro kconfig_definition(sc) -%}
+Kconfig Definitions
+===================
+
+.. highlight:: kconfig
+
+{% for node in sc.nodes %}
+
+At ``{{node.filename}}:{{node.linenr}}``
+{% if node.include_path %}
+Included via: {% for filename, linenr in node.include_path %}``{{filename}}:{{linenr}}``{% if not loop.last %} -> {% endif %}{% endfor %}
+{% endif %}
+Menu path: (Top) ->  {% for node_p in top_to_node(node) %}{% if node_p.prompt %}{{node_p.prompt[0]}}{% else %}{{kconfiglib.standard_sc_expr_str(node_p.item)}}{% endif %}{% if not loop.last %} -> {% endif %}{% endfor %}

Review comment:
       Use :menuselection: for nicer rendering as explain here: https://nuttx.apache.org/docs/latest/contributing/documentation.html#user-indications




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org