utils/installΒΆ
This directory hosts the Python implementation behind make install-lint.
For the general rules that govern READMEs in code directories see documentation.md.
PurposeΒΆ
The package installs the lint toolchain (actionlint, shfmt, ruff, ansible-lint, mbake, markdownlint-cli2, eslint, shellcheck, ansible-playbook, ansible-galaxy) using the right channel per tool (system package manager, pip, npm, or GitHub release). Modules at this level are channel-agnostic primitives; per-tool policy lives one level down in lint/.
StructureΒΆ
File |
Role |
|---|---|
|
Logging, sudo wrapping, PATH mutation, and stdlib-based URL download. |
|
Venv-aware pip installer with |
|
Global / local npm install with per-user |
|
Node.js runtime that is still supported upstream: the distro package, or the newest LTS from nodejs.org (signature- and checksum-verified) when the distro line has reached its end of life. |
|
Latest-tag resolver and asset downloader for GitHub releases. |
|
Per-manager dispatch for |
|
One module per tool, each exposing |
The CLI entry point lives at main.py, invoked from lint.sh as python3 -m utils.install.lint.
The matching dispatcher wrapper.sh routes make install-lint host vs container based on INFINITO_LINT_RUNNER.
File NamingΒΆ
Module names MUST stay lowercase snake_case.
Channel-agnostic helpers MUST live directly under
utils/install/.Per-tool policy (one tool per file) MUST live under
lint/(see lint README).Test files live in tests/unit/python/utils/install/ and mirror the module name with a
test_prefix.
Import RulesΒΆ
primitives.pyMUST NOT import from any other module in this package.pip.py,npm.py,github_release.py, andsystem_pkg.pyMAY import fromprimitives.py.npm.pyMAY import fromsystem_pkg.pyandnode.pyto bootstrap npm itself; no other cross-imports between these four are allowed.node.pyMAY import fromprimitives.pyandsystem_pkg.py.Per-tool modules under
lint/MUST NOT import each other (see lint README).