utils/install/lintΒΆ
Per-tool installer policy for the lint toolchain. For the packageβs overall role see README.md. For general README conventions see documentation.md.
PurposeΒΆ
Each module in this directory owns exactly one lint tool and exposes a single ensure() function.
The CLI in main.py groups these ensure calls and applies the stamp-based skip for the default βallβ invocation.
File NamingΒΆ
A module name MUST match the lowercase snake_case of the tool it installs:
actionlint->actionlint.pymarkdownlint-cli2->markdownlint_cli2.pyansible-lint->ansible/lint.py
Aggregate installers (one helper covers a tightly coupled command pair) take the topic name without a key suffix. Example:
ansible/commands.pyinstalls bothansible-playbookandansible-galaxyvia the same system-package candidates.
Module ShapeΒΆ
Every per-tool module MUST expose the same surface so the dispatcher can call it uniformly:
"""<one-line docstring: what gets installed and via which channel>."""
from __future__ import annotations
def ensure() -> None:
"""Install <tool> if not present. Raises RuntimeError on failure."""
ensure()MUST be idempotent: return immediately when the tool is already on PATH (or importable, for Python modules).ensure()MUST raiseRuntimeErrorwith a descriptive message on failure.A module MAY read tool-specific environment overrides (e.g.
ACTIONLINT_VERSION,RUFF_PIP_SPEC) at call time.
Import RulesΒΆ
A per-tool module MUST NOT import another per-tool module. Shared logic flows through
utils.install.primitives,utils.install.pip,utils.install.npm,utils.install.github_release, andutils.install.system_pkgonly.A per-tool module MAY import from
utils.cache(forPROJECT_ROOT) and from stdlib.
Group DispatchΒΆ
main.py maps each CLI group to a fixed set of ensure() calls:
Group |
Modules called (in order) |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
every group above, in the order listed |
The all mode honors a per-interpreter stamp at build/install-lint-<hash>.stamp (the suffix is the first 8 chars of sha256(sys.executable), so host and container track independently even though build/ is bind-mounted).
Stamp dependencies are lint.sh and pyproject.toml.
Group-targeted invocations always run and never touch the stamp.