1.. _module-pw_presubmit-format: 2 3=============== 4Code formatting 5=============== 6.. pigweed-module-subpage:: 7 :name: pw_presubmit 8 9.. admonition:: Note 10 :class: warning 11 12 https://pwbug.dev/326309165: While the ``pw format`` command interface is 13 very stable, the ``pw_presubmit.format`` library is a work-in-progress 14 effort to detach the implementation of ``pw format`` from 15 the :ref:`module-pw_presubmit` module. Not all formatters are migrated, and 16 the library API is unstable. After some of the core pieces land, this 17 library will be moved to ``pw_code_format``. 18 19.. _module-pw_presubmit-format-api: 20 21------------- 22API reference 23------------- 24 25Core 26==== 27.. automodule:: pw_presubmit.format.core 28 :members: 29 :special-members: DiffCallback 30 :noindex: 31 32Formatters 33========== 34.. autoclass:: pw_presubmit.format.bazel.BuildifierFormatter 35 :members: 36 :noindex: 37 38.. autoclass:: pw_presubmit.format.cpp.ClangFormatFormatter 39 :members: 40 :noindex: 41 42.. autoclass:: pw_presubmit.format.gn.GnFormatter 43 :members: 44 :noindex: 45 46.. autoclass:: pw_presubmit.format.python.BlackFormatter 47 :members: 48 :noindex: 49