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