Documentation Index
Fetch the complete documentation index at: https://docs.aspect.build/llms.txt
Use this file to discover all available pages before exploring further.
Documentation for @aspect_rules_lint@v2.3.0 — View source
binary, library, test rules.
Typical usage:
Ty is provided as a built-in tool by rules_lint. To use the built-in version,
create the linter aspect, typically in tools/lint/linters.bzl:
Function: ty_action
Run ty as an action under Bazel.
ty supports persistent configuration files at both the project- and user-level
as documented here: https://docs.astral.sh/ty/configuration/
Note: all config files are passed to the action.
This means that a change to any config file invalidates the action cache entries for ALL
ty actions.
Parameters
Bazel Rule or Aspect evaluation context
label of the the ty program
python files to be linted
depset of transitive Python sources from dependencies
labels of ty config files (pyproject.toml, ty.toml)
output file of linter results to generate
output file to write the exit code.
If None, then fail the build when ty exits non-zero.
https://docs.astral.sh/ty/reference/exit-codes/
environment variables for ty
list of paths to add as —extra-search-path for third-party module resolution
whether to enable color output (—color always) or disable it (—color never)
Function: lint_ty_aspect
A factory function to create a linter aspect.
Attrs:
binary: a ty executable
configs: ty config file(s) (pyproject.toml, ty.toml)
rule_kinds: which kinds of rules should be visited by the aspect
filegroup_tags: filegroups tagged with these tags will be visited by the aspect in addition to Python rule kinds

