mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-09 12:17:13 +00:00
`roles/` set as inline code reads as a literal path, yet the directory holds an index page the build resolves. Writing it as a link costs nothing and gives the reader the page; leaving it as code hides it, which is how this branch degraded six working references in one pass. The lint strips markdown links from a line before scanning it, or it would report the code span inside a finished link, and it skips fenced blocks. It reads the index filenames from the same place the link lint does. Two false-positive classes came out of the first run and shaped the rule. A span of nothing but dots and slashes is a path word, not a path: '/' names a filesystem in a table of mount points and '../' names the traversal an argument must not perform. An absolute span is skipped because this repository writes Keycloak group paths that way, and /roles/web-app-bluesky is a group, not a folder. 35 spans across 12 files become links, and the documentation build resolves every one of them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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 |
|---|---|
primitives.py |
Logging, sudo wrapping, PATH mutation, and stdlib-based URL download. |
pip.py |
Venv-aware pip installer with --break-system-packages and --user fallback. |
npm.py |
Global / local npm install with per-user --prefix fallback. |
github_release.py |
Latest-tag resolver and asset downloader for GitHub releases. |
system_pkg.py |
Per-manager dispatch for pacman / apt-get / dnf / yum / brew. |
lint/ |
One module per tool, each exposing ensure(). See lint README. |
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 atest_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.pyto bootstrap npm itself; no other cross-imports between these four are allowed.- Per-tool modules under
lint/MUST NOT import each other (see lint README).