pigweed.json
configuration options#
pw_presubmit: Python tools for running presubmit checks and linters
pw.pw_presubmit.format.black_config_file
#
Type |
str (path) |
Path to the toml file containing Black formatting configuration.
Note
This only applies when running pw format
from GN. Bazel-based formatting
walks up parent directories for the current file being formatted until it
finds a .black.toml
file.
pw.pw_presubmit.format.black_path
#
Type |
str (path) |
When formatting with Black, uses the formatting tooling to call the binary at
the specified path rather than calling black
from the shell PATH
.
Note
This only applies when running pw format
from GN. Bazel-based formatting
uses the black
binary bundled via runfiles.
pw.pw_presubmit.format.exclude
#
Type |
List[str] (regex) |
Regex patterns of files that should be excluded from formatting checks.
Tip
Regex patterns are
searched
relative to the pigweed.json
file. This means "^README$"
will match a
README
file next to the pigweed.json
, and "(^|/)README$"
will
match every README
in the same directory or any directories beneath the
pigweed.json
file.
pw.pw_presubmit.format.python_formatter
#
Type |
str (choice) |
Valid choices |
|
Which tool to use for Python code formatting: Black or YAPF.
Note
This only applies when running pw format
from GN. Bazel-based formatting
always uses Black.