pw_build: Replace 'lint' with 'static_analysis' in pw_python_package
- Move the lint actions to separate templates.
- Support specifying which static analysis tools to run in the
'static_analysis' argument.
- Support 'static_analysis' and related options in pw_python_script.
Change-Id: I33e0a048154b60fc0088c74e25ff95e7944d9d75
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/38140
Commit-Queue: Wyatt Hepler <hepler@google.com>
Reviewed-by: Armando Montanez <amontanez@google.com>
diff --git a/pw_build/python.rst b/pw_build/python.rst
index 520b333..fc201eb 100644
--- a/pw_build/python.rst
+++ b/pw_build/python.rst
@@ -34,8 +34,8 @@
- ``proto_library`` - A pw_proto_library target to embed in this Python package.
generate_setup is required in place of setup if proto_library is used. See
:ref:`module-pw_protobuf_compiler-add-to-python-package`.
-- ``lint`` - If true (default), applies Mypy and Pylint to the package. If
- false, does not.
+- ``static_analysis`` List of static analysis tools to run; ``"*"`` (default)
+ runs all tools. The supported tools are ``"mypy"`` and ``"pylint"``.
- ``pylintrc`` - Optional path to a pylintrc configuration file to use. If not
provided, Pylint's default rcfile search is used. Pylint is executed
from the package's setup directory, so pylintrc files in that directory