xref: /aosp_15_r20/external/pigweed/pw_module/docs.rst (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1.. _module-pw_module:
2
3---------
4pw_module
5---------
6The ``pw_module`` module contains tools for managing Pigweed modules.
7For information on the structure of a Pigweed module, refer to
8:ref:`docs-module-guides`.
9
10Commands
11--------
12
13.. _module-pw_module-module-check:
14
15``pw module check``
16^^^^^^^^^^^^^^^^^^^
17The ``pw module check`` command exists to ensure that your module conforms to
18the Pigweed module norms.
19
20For example, at time of writing ``pw module check pw_module`` is not passing
21its own lint:
22
23.. code-block:: none
24
25   $ pw module check pw_module
26
27    ▒█████▄   █▓  ▄███▒  ▒█    ▒█ ░▓████▒ ░▓████▒ ▒▓████▄
28     ▒█░  █░ ░█▒ ██▒ ▀█▒ ▒█░ █ ▒█  ▒█   ▀  ▒█   ▀  ▒█  ▀█▌
29     ▒█▄▄▄█░ ░█▒ █▓░ ▄▄░ ▒█░ █ ▒█  ▒███    ▒███    ░█   █▌
30     ▒█▀     ░█░ ▓█   █▓ ░█░ █ ▒█  ▒█   ▄  ▒█   ▄  ░█  ▄█▌
31     ▒█      ░█░ ░▓███▀   ▒█▓▀▓█░ ░▓████▒ ░▓████▒ ▒▓████▀
32
33   20191205 17:05:19 INF Checking module: pw_module
34   20191205 17:05:19 ERR PWCK004: Missing ReST documentation; need at least e.g. "docs.rst"
35   20191205 17:05:19 ERR FAIL: Found errors when checking module pw_module
36
37
38.. _module-pw_module-module-create:
39
40``pw module create``
41^^^^^^^^^^^^^^^^^^^^
42The ``pw module create`` command is used to generate all of the required
43boilerplate for a new Pigweed module.
44
45.. note::
46
47   ``pw module create`` is still under construction and mostly experimental.
48   It is only usable in upstream Pigweed, and has limited feature support, with
49   a command-line API subject to change.
50
51   Once the command is more stable, it will be properly documented. For now,
52   running ``pw module create --help`` will display the current set of options.
53