code_quality_tool
Configure a runnable to use as a linter, fixer or formatter
Example BUILD file:
code_quality_tool(
runnable=":flake8_req",
execution_dependencies=[":config_file"],
file_glob_include=["**/*.py"],
)
Backend: pants.backend.experimental.adhoc
file_glob_include
Iterable[str]Globs that identify files that can be processed by this tool
A file matching any of the supplied globs is eligible for processing. Example: ["**/*.py"]
runnable
strAddress to a target that can be invoked by the run goal (and does not set run_in_sandbox_behavior=NOT_SUPPORTED). This will be executed along with any arguments specified by args, in a sandbox with that target's transitive dependencies, along with the transitive dependencies specified by execution_dependencies.
args
Iterable[str] | None()Extra arguments to pass into the runnable field before the list of source files
description
str | NoneNoneA human-readable description of the target.
Use pants list --documented :: to see all targets with descriptions.
execution_dependencies
Iterable[str] | NoneNoneAdditional dependencies that need to be available when running the tool. Typically used to point to config files.
file_glob_exclude
Iterable[str] | None()Globs matching files that should not be processed by this tool
runnable_dependencies
Iterable[str] | NoneNoneThe runnable dependencies for this command.
Dependencies specified here are those required to exist on the PATH to make the command complete successfully (interpreters specified in a #! command, etc). Note that these dependencies will be made available on the PATH with the name of the target.
See also execution_dependencies.
tags
Iterable[str] | NoneNoneArbitrary strings to describe a target.
For example, you may tag some test targets with 'integration_test' so that you could run pants --tag='integration_test' test :: to only run on targets with that tag.