configuration

This guide covers all configuration options for Lintro and the underlying tools it integrates. Learn how to customize behavior, set tool-specific options, and optimize

Configuration Guide

This guide covers all configuration options for Lintro and the underlying tools it integrates. Learn how to customize behavior, set tool-specific options, and optimize Lintro for your project.

TL;DR: Lintro uses your existing tool configs (.prettierrc, pyproject.toml, etc.) automatically. It only provides fallback defaults when no native config exists. Use enforce.line_length to ensure consistent settings across all tools via CLI injection.

Configuration Model: 5-Tier System

Lintro uses a clear 5-tier configuration model that separates concerns:

TierPurposeWhen Applied
executionWhat tools run and howAlways
enforceCross-cutting settings (line_length, target_python)Always (via CLI flags)
defaultsFallback config when no native config existsOnly when no native config
toolsPer-tool enable/disable and config sourceAlways
aiAI-powered summaries and fixesWhen enabled + API key set

The five tiers above form the LintroConfig model’s core configuration story (lintro/config/lintro_config.py). Additional optional sections — review (diff-review checklist) and watch (lintro watch defaults; see Watch Mode) — configure specific commands rather than tool resolution.

Key Principles

  1. Native configs are respected by default - Tools use their own .prettierrc, pyproject.toml [tool.ruff], etc.
  2. enforce settings override via CLI flags - Line length and target Python are injected as CLI arguments to ensure consistency
  3. defaults provide fallbacks - Only used when a tool has no native config file
  4. Simple and transparent - Users know exactly which config is used

Section Types and Null Values

Omitting a section uses its defaults. When present, each of enforce, execution, defaults, tools, ai, review, output, watch, and deps must be a mapping. Use an empty mapping such as ai: {} for default settings. Explicit nulls (ai: null, ai: ~, or a bare ai:), lists, and scalar section values raise ConfigurationError. This applies to both project and global config, and to [tool.lintro] sections in pyproject.toml (TOML has no null value). Each source is checked before merging, so a project mapping cannot hide an invalid global section.

A YAML config document must also be a mapping. A top-level list, scalar, null, or an empty or comment-only file raises ConfigurationError instead of silently loading defaults or falling back to pyproject.toml. An empty mapping document ({}) retains the existing fallback behavior.

Migration: Empty and comment-only project or global YAML files that previously loaded defaults now raise an error. Remove an unused config file or replace its contents with {} to keep the fallback behavior. Replace bare section keys such as ai: with ai: {} when default section settings are intended.

The independent lintro licenses reader applies the same mapping requirement to project and global YAML documents and their licenses: sections, and to a present [tool.lintro.licenses] table in pyproject.toml. Invalid shapes raise ConfigurationError before merging, even when the other tier supplies a valid policy. YAML syntax, constructor, excessive nesting, decoding, and read failures also raise ConfigurationError with the source path and original cause, as do TOML parse/decode failures. The Python loader propagates TOML I/O errors (OSError) and policy-field validation errors (Pydantic ValidationError, a ValueError); an invalid explicit global path still raises FileNotFoundError. The CLI reports these configuration failures on stderr and exits with status 1, including without --check, before collecting packages or emitting a report.

Omitted licenses sections, licenses: {}, and {} documents keep their existing defaults, inheritance, and pyproject fallback. An absent or empty TOML license table inherits the global policy or uses defaults. A populated project YAML license section takes precedence over TOML, so the lower-priority file is not read in that case. Migration for licenses: Replace licenses: null, licenses: ~, or a bare licenses: with licenses: {}, or omit the section to inherit settings. Remove unused empty files or replace their contents with {}.

Tiered Configuration Flow

The configuration system works in a specific order:

  1. Execution Tier - Determines which tools run and in what order

    • enabled_tools: A strict allowlist. When set to a non-empty list, only those tools run on default and --tools all runs; tools outside it are not listed individually (the summary shows one count line, and --verbose or JSON output names them). When the key is omitted, all enabled tools run when a config file is present (.lintro-config.yaml or a non-empty [tool.lintro] table in pyproject.toml). An explicit empty list (enabled_tools: []) is deprecated: it behaves like an omitted key and lintro config validate warns. Omit the key, or list the tools to run. A no-config first run scopes tools to languages detected from manifests and source files (a directory of *.py / *.js with no pyproject.toml / package.json still selects ruff/prettier). Use --tools all or lintro init for the full registry. An empty [tool.lintro] table is not a config, so language scoping still applies. An explicit named --tools list on the CLI bypasses this allowlist; default runs and --tools all remain filtered by it. This is a feat/minor default change: kitchen-sink CI that relied on the unscoped no-config toolset should pass --tools all or add a config file. Detection uses the chk/fmt scan paths (a file uses its parent directory; multiple paths are unioned). When no paths are given the default is . (the current working directory). Tools that are not in the language map (for example commitlint) are still selected when their native config file is present at a scan root. Nested YAML/Markdown/shell files count; a lone root README.md does not enable Markdown tools.
    • fail_fast: Whether to stop on first tool failure
    • parallel: Whether to run tools in parallel (default: true)
    • max_workers: Maximum parallel workers, 1-32 (default: CPU count)
    • auto_install_deps: Auto-install Node.js dependencies if missing, for the tools that need a project dependency tree (tsc, vue-tsc, svelte-check, astro-check). Unset by default, in which case Lintro falls back to container auto-detection (enabled inside containers, disabled otherwise)
    • tool_snapshot_ttl: Seconds to cache tool capability probes under .lintro-cache/tool-snapshots.json (default: 600), scoped to the execution directory. Resolved command, binary path and mtime changes invalidate immediately, including a newly preferred project-local binary. Refreshing a watch subset or loading disk entries does not extend the age of older snapshots. Wrapper commands without reliable package identity, including cargo and rustup proxies, are re-probed. Failed probes of resolved executables are retried on the next lookup. Use lintro check --no-cache to force fresh probes in every execution directory.
    • strict_missing_tools: When true, unavailable tools, and installed tools below the minimum version, fail the run (exit 1); the --strict-missing-tools flag on chk and fmt sets it for one run (see Strict Mode for Missing Tools). Default false — missing tools report status: unavailable with a remediation hint and do not count as a lint failure. Unavailable results carry a frozen Unavailable(reason, strict) outcome, retain unknown fix counts, and expose unavailable_reason separately from a deliberate skip’s skip_reason. In JSON, a non-strict unavailable result has skipped: false and success: true; use status or unavailable to detect that it did not run. Runtime capabilities include supports_stdin: true/false when declared by the tool definition, or null when unspecified.
    • version_check_timeout: Seconds one tool version probe (<tool> --version) may run (default: 30, minimum 1). A probe that times out is retried once with double the budget, capped at 120 seconds; a budget already at or above 120 is retried unchanged. The LINTRO_VERSION_TIMEOUT environment variable takes precedence over this key. A probe that times out on both attempts reports the tool as unavailable with probe_failure: probe_timeout, an unavailable_reason naming both budgets (for example version probe timed out twice (30 s, 60 s)) and probe_seconds, the wall-clock time both attempts took. That is distinct from probe_failure: binary_missing, which is reported only when launching the probe fails with “file not found” (or a tool without a version probe is not on PATH).
  2. Enforce Tier - Cross-cutting settings injected as CLI flags

    • These settings override native configs via CLI arguments
    • Example: line_length: 88 becomes --line-length 88 for ruff/black
    • Applied to all tools that support the setting
  3. Defaults Tier - Fallback configuration when no native config exists

    • Only used if tool’s native config file is not found
    • Example: If .prettierrc doesn’t exist, use defaults.prettier
    • Generated as temporary config files when needed
  4. Tools Tier - Per-tool enable/disable, config source, and auto-install

    • enabled: Whether the tool is enabled
    • config_source: Optional explicit path to native config file
    • auto_install: Per-tool auto-install override (true/false/omit to inherit global)
  5. AI Tier - AI-powered summaries and fix suggestions (opt-in)

    • enabled: Whether AI features are active (default: false)
    • provider: AI provider to use (anthropic, cursor or openai) — required once ai.lint or ai.review is enabled; there is no default
    • Applied only when enabled and a valid API key is set

Configuration Resolution Example

For a tool like Prettier:

  1. Check if tool is enabled (tools.prettier.enabled)
  2. Check for native config (.prettierrc, .prettierrc.json, etc.)
  3. If native config found:
    • Use native config
    • Inject enforce.line_length as --print-width CLI flag
    • Ignore defaults.prettier
  4. If no native config found:
    • Generate temp config from defaults.prettier
    • Inject enforce.line_length as --print-width CLI flag
    • Use generated config

This ensures consistent behavior while respecting tool-specific configurations.

Configuration Source Precedence

Independently of the tier model above (which describes how each section is applied), Lintro resolves where config values come from in a fixed order. Later sources override earlier ones key-by-key via a deep merge, including nested ai: and tools: sections:

  1. Built-in defaults — the empty baseline configuration.
  2. User-level global config — ~/.lintro-config.yaml (see below). Supplies base values shared across all your projects.
  3. Project config — the first of: an upward-searched .lintro-config.yaml variant, or [tool.lintro] in pyproject.toml. Overrides the global config per key.

A value set in the global config survives only where the project config does not override that exact key path. An absent auto-discovered global file or one containing an empty mapping ({}) is never an error. An empty or comment-only auto-discovered global file, any other non-mapping document, or an explicit LINTRO_GLOBAL_CONFIG path that does not exist raises an error (see below).

In the tools: section a scalar entry such as ruff: false is a complete statement about the tool, so a project scalar replaces the global mapping wholesale. A project mapping that never mentions enabled is only a partial statement, so a global ruff: false still keeps the tool disabled while the project’s other keys apply.

User-Level Global Config

Place a ~/.lintro-config.yaml in your home directory to share settings across every project. It uses the exact same schema as a project .lintro-config.yaml, including plugins: and licenses:. Those sections are loaded from the resolved global file as the base tier and overlaid by a non-global project file; the home dotfile and the active global file are never treated as a project config, even when LINTRO_GLOBAL_CONFIG=off. Project config always wins on a per-key basis, so the global file is best for personal defaults (for example an ai: block, a preferred enforce.line_length, or a plugins.trusted allowlist) that individual projects can still override.

Resolution order (first existing file wins):

  1. LINTRO_GLOBAL_CONFIG — an explicit file path, or off (also 0, false, no, none, or empty) to disable the global tier entirely. Useful for CI and hermetic test environments that must not inherit a developer’s personal defaults. An explicit path that does not exist is an error rather than a silent fallback, so a typo cannot leave you running without the defaults you asked for; use off to opt out deliberately.
  2. ~/.lintro-config.yaml — the primary, authoritative location.
  3. $XDG_CONFIG_HOME/lintro/config.yaml — an XDG fallback, where $XDG_CONFIG_HOME defaults to ~/.config when unset.

The home-directory dotfile deliberately takes precedence over the XDG fallback when both exist, so ~/.lintro-config.yaml is always authoritative.

If your project lives inside your home directory, the upward search for a project .lintro-config.yaml can reach ~/.lintro-config.yaml itself. That file is counted as the global tier only — never as both tiers — so it is reported once and its keys are still listed as global contributions rather than looking like a project override of itself. This holds even when the global tier is disabled: with LINTRO_GLOBAL_CONFIG=off the home dotfile is ignored outright rather than demoted to a project config, which is what makes the switch genuinely hermetic. The same switch applies to the plugin-trust and licenses loaders: they search upward on their own, so without it a cwd under $HOME would still pick up plugins: / licenses: from the home file.

[!IMPORTANT] Upgrading with an existing ~/.lintro-config.yaml. Before user-level global config existed, that file only took effect when the upward search happened to reach it — that is, for projects under your home directory with no config of their own. It is now a base layer for every project, so keys your project config omits (an ai: block, enforce.line_length, tool enables) start applying where they previously did not. If you were using it as a no-project-config fallback and want the old behavior, move it into the projects that need it, or set LINTRO_GLOBAL_CONFIG=off.

A global file that only sets ai: or enforce: does not change which tools a default run selects — language scoping for an otherwise unconfigured project still applies. A global tools: section or execution.enabled_tools is a deliberate tool selection, so it opts the run out of language scoping just as a project config does.

Run lintro config to see a Global Config section reporting whether a global file was found, its resolved path, and which effective values it contributed (the keys your project config did not override). The same details appear under global_config in lintro config --json. Only keys that survive section parsing are listed there — an unrecognized key such as output.typo, or a section Lintro does not read from config at all, is never reported as a contribution it does not actually make.

# ~/.lintro-config.yaml — applies to all your projects unless overridden
enforce:
  line_length: 100
ai:
  enabled: true
  provider: anthropic # or cursor / openai — required, no default
  transport: api # or cli — no default; doctor flags it unset

Lintro Configuration

Configuration File: .lintro-config.yaml

Create a .lintro-config.yaml in your project root:

# Tier 1: EXECUTION - What tools run and how
execution:
  # enabled_tools: [ruff, mypy] # Strict allowlist; omit to run all enabled tools
  # (config present). A no-config first run is language-scoped. [] is deprecated
  # (treated as omitted, with a warning).
  fail_fast: false
  parallel: true # Run tools in parallel (default: true)
  max_workers: 10 # Max parallel workers, 1-32 (default: CPU count)
  auto_install_deps: false # Auto-install Node.js deps if missing

# Tier 2: ENFORCE - Cross-cutting settings injected via CLI flags
# These OVERRIDE native configs for consistency
enforce:
  line_length: 88 # Injected as --line-length, --print-width, etc.
  target_python: py313 # Injected as --target-version

# Tier 3: DEFAULTS - Fallback config when NO native config exists
# Only used if tool's native config file is not found
defaults:
  prettier:
    semi: true
    singleQuote: true
  yamllint:
    extends: default

# Tier 4: TOOLS - Per-tool enable/disable, config source, and auto-install
tools:
  ruff:
    enabled: true
  prettier:
    enabled: true
    config_source: '.prettierrc' # Optional: explicit native config path
  tsc:
    auto_install: true # Override global auto_install for this tool only

Each tools.<name> value must be a mapping (ruff: {} or ruff: {enabled: true}) or a boolean (ruff: true / ruff: false). A bare tools.ruff: is YAML null and is rejected by check, format, and config show with exit 1. Use lintro config validate for a structured report.

Configuration Report Command

Use lintro config to view the current configuration status for all tools:

# View configuration report
lintro config

# Show detailed output including native configs
lintro config --verbose

# Output as JSON for scripting
lintro config --json

The config command shows:

  • Enforce settings: Central line_length, target_python
  • Tool execution order: Derived from each tool’s declared claims
  • Per-tool configuration: Whether enabled, native config found
  • Defaults applied: Which tools are using fallback defaults

Severity Counts and the Count Delta

lintro check reports what it found by severity, and how that changed since the previous check in the same workspace:

Issues: 3 errors, 1 warning, 0 info
Change since last run: -12 errors, +1 warning

The change line is coloured by the direction of improvement, not by the arithmetic sign: fewer issues is better, so -12 errors is green and +3 errors is red. Only the severities that actually moved are listed; a run with no movement reads no change. Severities are compared most-severe first, so trading an error for a warning still reads as an improvement.

To acknowledge individual existing findings instead, opt in to a fingerprint baseline with --baseline PATH or a top-level baseline: PATH configuration key. Its filtering is separate from the automatic severity-count comparison below; filtered runs leave severity history untouched.

The comparison baseline is stored as severity-baseline.json at the root of the log directory — LINTRO_LOG_DIR, default .lintro — rather than inside a run-* directory, so run pruning never removes it.

Counts are compared only when the normalized path arguments and executed tool set match. The file retains at most 32 scopes in last-write order; updating a scope makes it newest, while reading it does not. The latest run whose paths resolve to the full working directory is protected from eviction, even across many staged-file checks. Older scopes are discarded first, and invalid entries are removed on the next write. Older files without retention metadata remain readable; a new full-path check establishes the protected scope. --diff and --incremental checks neither compare against nor update this file.

Writers use severity-baseline.json.lock beside the baseline and wait up to one second for contention before skipping the optional update. The lock file remains after the run so concurrent writers always coordinate on the same file; include it with the rest of .lintro/ in your ignore rules.

Only a run that actually measured the project reads or writes it, and the same rule governs both sides. A run qualifies when it is a check (not format or test, which measure something else), is not a fmt --dry-run preview (those report as checks but count only the auto-fixable subset), and had at least one tool actually inspect files. Runs that do not qualify — an empty directory, an all-skipped toolset, a toolset that declined to run for want of configuration, an early exit — leave the previous baseline in place rather than overwriting it with zeroes, so the next comparison may be against an older run rather than the immediately preceding one. A missing or unreadable baseline simply omits the change line, and never fails a run.

A tool timeout is treated differently by the baseline and by the badge, on purpose. A check where one tool timed out but another inspected files still records a baseline: the alternative would let a single flaky semgrep or gitleaks timeout freeze the baseline, so the next successful run would report its delta against an arbitrarily old measurement. lintro badge refuses that same run, because a badge is a public claim and “0 issues” would assert something about findings that were never collected.

Removed in favour of this (issue #1739). lintro used to compute a 0-100 “health score” along with check --score and check --fail-under N. The score had no size normalization, so ten errors scored the same in a 200-line project and a 500k-line one, and enabling more tools mechanically lowered it. --fail-under gated CI on that fabricated number; it is gone with no replacement, because chk already exits non-zero when issues exist.

The badge

lintro badge                  # markdown shields.io badge for the issue counts
lintro badge --style flat     # shields.io style variant
lintro badge --url            # bare badge URL
lintro badge --json           # counts, message, color, url, and markdown as JSON

--json and --url are mutually exclusive. lintro badge runs a check and prints a shields.io snippet such as ![Lintro Issues](https://img.shields.io/badge/lintro-0%20issues-brightgreen). Badge colour is bright green for a clean run, red when any error was found, and yellow when only warnings or info issues remain.

Passing any of --errors N / --warnings N / --info N skips the live check entirely and treats the severities you omit as zero.

A live badge refuses to publish rather than assert a quality claim the run did not support. It exits non-zero, printing no snippet, when the check exited early, when any tool timed out, and when nothing actually inspected a file — which covers an empty directory, an all-skipped toolset, and a toolset that declined to run for want of configuration. Coverage comes from the producer’s ToolResult.inspected_files signal, never its message text. Results that leave this signal as None have unknown coverage and cannot alone qualify a badge. A severity baseline also rejects mixed runs containing both inspected and unknown results, for comparison and storage.

JSON output

In --output-format json the tallies appear under summary, alongside total_issues, total_net_resolved, total_remaining, timed_out_tools and residual_unknown_tools (the tools the two derived totals could not cover; see Mutate-then-verify). summary.total_fixed carries the same value as total_net_resolved and is deprecated: read the new key. It will be removed in a later release. The summary.health_score object is gone — this is a breaking change for anything that read it. severity_delta appears only when a comparable baseline exists; on a first run the key is absent rather than zero. The stdout document looks like this:

{
  "summary": {
    "total_issues": 3,
    "total_net_resolved": 0,
    "total_fixed": 0,
    "total_remaining": 3,
    "severity_counts": { "error": 1, "warning": 2, "info": 0, "total": 3 },
    "severity_delta": { "error": -4, "warning": 2, "info": 0, "total": -2 }
  }
}

--output files and configured JSON artifacts carry the same two severity keys, but the rest of their summary object differs from the stdout document by design — it adds tools_run and omits total_remaining. timestamp and action are at the document root:

{
  "timestamp": "2026-09-06T00:00:00+00:00",
  "action": "check",
  "summary": {
    "total_issues": 3,
    "total_net_resolved": 0,
    "total_fixed": 0,
    "tools_run": 12,
    "timed_out_tools": [],
    "severity_counts": { "error": 1, "warning": 2, "info": 0, "total": 3 },
    "severity_delta": { "error": -4, "warning": 2, "info": 0, "total": -2 }
  }
}

Tool Timeouts in the JSON Report

A tool timeout is an execution failure, never a lint finding. Every tool accounts for one the same way, so a consumer can tell an infrastructure flake apart from a genuine finding using evidence about its own run.

A timed-out tool reports:

  • success: false — the run failed, and the process exit code stays non-zero.
  • timed_out: true — the machine-readable marker to classify on. No need to regex-match the human-readable output string.
  • issues_count counting only genuine findings. No synthetic TIMEOUT pseudo-issue is invented, and the timeout never reaches summary.total_issues. Issues legitimately detected before the timeout (for example the pre-fix check of a format run) are still reported.

Every per-tool object also includes status, one of ok, failed, skipped, or unavailable (see lintro.enums.tool_result_status.ToolResultStatus). Missing binaries set status: unavailable and unavailable: true; they are not a lint failure unless execution.strict_missing_tools (or --strict-missing-tools) is enabled, which also reports a below-minimum tool as unavailable instead of skipped. lintro list-tools table output has a matching Status column.

A per-tool object may carry metadata.notes: things to know about a complete result that are neither findings nor a failure. Each note is an object with summary (a few words, shown in the summary table’s Notes column) and message (the full text). Today only OSV-Scanner sets one, naming the manifests whose indirect dependencies it could not resolve, so a clean result reads “clean for the packages that were checked”. The note never replaces output, which stays the tool’s own report:

{
  "tool": "osv_scanner",
  "success": true,
  "issues_count": 0,
  "metadata": {
    "notes": [
      {
        "summary": "indirect dependencies not resolved",
        "message": "OSV-Scanner scanned the packages listed in these manifests but could not resolve their indirect dependencies, so those were not checked: requirements.txt: package System(7):internal-pkg: not found"
      }
    ]
  }
}

The console prints each note under the tool’s result, and the Markdown, HTML and plain-text reports print it in the tool’s section. CSV reports (--output-format csv, --output <file>.csv and the run directory’s summary.csv) have a notes column after the original ones, filled on each of the tool’s rows and empty for a tool without notes.

summary.timed_out_tools lists the tools that timed out, in execution order:

{
  "summary": {
    "total_issues": 0,
    "total_net_resolved": 0,
    "total_fixed": 0,
    "total_remaining": 0,
    "timed_out_tools": ["mypy"]
  },
  "results": [
    {
      "tool": "mypy",
      "success": false,
      "issues_count": 0,
      "timed_out": true,
      "output": "mypy execution timed out (300s limit exceeded)..."
    }
  ]
}

This makes the conservative CI classification expressible: at least one tool timed out AND total_issues == 0. A run with a real finding still reports a non-zero total_issues, and a non-timeout tool failure reports timed_out: false, so neither is ever mistaken for a flake.

Artifacts Under GitHub Actions

When GITHUB_ACTIONS=true is detected, lintro auto-emits two side-channel artifacts regardless of --output-format, so the console/grid output every existing consumer parses is untouched and no second invocation is needed:

FormatPathPurpose
SARIF.lintro/artifacts/sarif/results.sarif.jsonGitHub Code Scanning ingestion
JSON.lintro/artifacts/json/results.jsonStructured CI evidence (see above)

SARIF omits clean tools and omits failures that produced no issues, so it cannot be used to classify a timeout without failing open. The JSON report covers every tool that ran and carries the per-tool timed_out flag.

Any format listed in execution.artifacts is emitted in addition to these, in every environment.

Output Presentation

Purely cosmetic console output is controlled by the output section. These settings never affect machine-readable documents (JSON/SARIF) or on-disk artifacts.

# .lintro-config.yaml
output:
  art: true # Show decorative ASCII art after a run (default: true)

The decorative ASCII art printed after check/fmt is only emitted to an interactive terminal. It is always suppressed when:

  • stdout is not a TTY (piped output, CI logs, redirected files), or
  • output.art: false is set in config, or
  • the --no-art flag is passed to lintro check / lintro format.

The art is never written to .lintro/run-*/report.md, console.log, or any --output-format stream regardless of these settings.

lintro check --no-art   # suppress art for this run only
lintro format --no-art

Command-Line Options

Global Options

# Output options
lintro check                  # Use grid formatting
lintro check --output results.txt            # Save output to file
lintro check --group-by [file|code|none|auto|category] # Group issues

# Tool selection
lintro check --tools ruff,prettier           # Run specific tools only
lintro check --tools all                     # Run all available tools

# File filtering
lintro check --exclude "*.pyc,venv"          # Exclude patterns
lintro check --include-venv                  # Include virtual environments
lintro check path/to/files                   # Check specific paths

Confirmation Prompt Options

# Skip confirmation prompts (auto-accept)
lintro check --yes
lintro check -y

# Useful in scripts and CI where no interactive input is available
lintro format --yes --tools ruff,prettier

The --yes/-y flag is available for check, format, and test commands. It skips any confirmation prompts that would otherwise pause execution.

Note: Confirmation prompts are automatically skipped in non-TTY environments (CI pipelines, Docker containers, scripts with redirected output), so --yes is typically only needed when running interactively and you want to avoid prompts.

Incremental Checks (--incremental)

lintro check --incremental hands each tool only the files that tool has not already checked clean since they last changed. Each tool keeps its own record under ~/.lintro/cache/<tool>.json; a file counts as changed when its modification time, size, inode change time (ctime) or permission bits differ from the recorded ones, so a chmod, a restored mtime or a same-size replacement is checked again. --no-cache deletes every record.

The rule for recording a file is fail closed:

  • Only lintro check records. A lintro format run never writes the record: its final verdict comes from the verify pass, after every formatter has run.
  • Every lintro check keeps the record honest, --incremental or not. A finding in any file removes that file’s entry, even a file the run was not handed (pylint reporting a.py after only b.py changed), and a full check that completed removes the entries of files it did not prove clean. Only an --incremental run adds entries, so a user who never passes --incremental gets no cache file; a full check whose tool was unavailable, failed or was interrupted proved nothing and leaves the record as it was.
  • A file is recorded after the tool has run, never before. Discovery only reads the record. Nothing is written when the tool was not installed, its version was refused, it was skipped, it timed out, its run failed or was incomplete, or the run was stopped (Ctrl-C, an exception, a kill). The next incremental run checks those files again.
  • A file is recorded only if the code that ran the tool states it handed that exact discovered path to an invocation that completed. The shared per-file and batch runners state the list they pass; ruff, black, pylint (after include), taplo, typos (text files only), spectral (per ruleset group) and bandit (the files its report says it scanned) state their own. Every other tool states nothing and is never narrowed by --incremental: mypy (a whole-project analyser), gitleaks (scans a directory or the git history), golangci-lint, clippy and rustfmt (projects), import-linter (contracts), tsc, vue-tsc, svelte-check and astro check, and the tools not yet audited (actionlint, buf, html-validate, markdownlint, stylelint, trufflehog, vale, yamllint). A symlink and its target are separate entries.
  • A clean result needs evidence that files were read. A successful run with no finding records files only when the tool reports that it inspected them; a run in which part of the check was skipped (black’s E501 supplement without ruff) records nothing.
  • Only files checked with no finding are recorded. A file with a finding stays unrecorded, so every incremental run reports it again until it is fixed: an unchanged file with findings never turns a later incremental run green.
  • A result with findings records the other files only when the tool’s report was parsed in full. Several tools cannot certify that (shellcheck, hadolint and other per-file runners); for them a single finding means no file of that run is recorded, and the next run checks them all again.
  • The recorded fingerprint is the one taken before the tool read the file. A file you edited during the run is checked again next time.
  • A file lintro itself cannot open for reading is never recorded, whatever the tool reported, because a tool may exit 0 without reading a file it could not open.
  • A record that cannot be read (invalid bytes, malformed JSON) is discarded and every file is checked.
  • Known gap: configuration is not part of the record. A file lintro handed to a tool that the tool’s own ignore settings then skipped (ignore: in .yamllint, a .prettierignore entry, ruff’s extend-exclude) is recorded as clean, and removing the ignore later does not re-check it; neither does any other change to a tool’s configuration or version. Run lintro check --no-cache after changing them.

Tools whose result depends on data that changes independently of the files declare incremental_cacheable=False and are never narrowed: cargo_audit, cargo_deny, osv_scanner and pip_audit (advisory databases), semgrep (its default --config auto fetches registry rules) and commitlint (it checks the commit message, not files). Under --incremental they check every file in scope and their output says so. --diff still narrows them.

Records written by lintro before this rule existed could list files no tool had checked. They carry no format version and are discarded the first time each tool runs, so the first incremental run after upgrading checks everything once.

The rule lives in the executor that every run goes through, sequential or parallel, so it holds for the CLI and the Python API (incremental=True) alike. lintro watch and the MCP server use the same executor but never run incrementally. Calling a plugin’s check directly, outside that executor, reads the record but never adds to it.

Node.js Dependency Options

# Auto-install Node.js dependencies if node_modules is missing
lintro check --auto-install --tools tsc

# Useful for TypeScript projects where dependencies aren't installed
lintro check src/ --tools tsc,oxlint --auto-install

The --auto-install flag is available for both check and format commands. When enabled, Lintro runs bun install (or npm install if bun is unavailable) before running the tools that need a project’s dependency tree to work: tsc, vue-tsc, svelte-check and astro-check.

It does not apply to standalone Node.js binaries such as prettier, oxlint, oxfmt, stylelint or markdownlint-cli2. Those run fine without a local node_modules: if the project has not installed them, resolution falls through to a binary on PATH and then to a version-pinned bunx/npx fetch — see Node.js Tool Resolution. When one of them cannot be resolved at all, Lintro reports a ⏭️ SKIP row with the reason instead of a pass — installing project dependencies would not have helped.

You can also enable this globally via configuration:

# .lintro-config.yaml
execution:
  auto_install_deps: true

Per-tool auto-install lets you override the global setting for individual tools:

# .lintro-config.yaml
tools:
  tsc:
    auto_install: true # Always auto-install deps for tsc
  prettier:
    auto_install: false # Never auto-install deps for prettier
  oxlint:
    # Omit auto_install to inherit the global setting

Resolution order: per-tool auto_install > global auto_install_deps > false

Container Auto-Detection

Lintro automatically detects container environments (Docker, Podman, LXC, Kubernetes) and enables auto-install by default when running in a container. This means Node.js tools work out of the box in Docker without any configuration.

You can override this behavior explicitly via configuration or the --auto-install CLI flag:

# .lintro-config.yaml — disable auto-install even inside a container
execution:
  auto_install_deps: false

See the Docker Usage Guide for more details on container behavior.

Tool-Specific Options

# Tool-specific options (key=value; lists use |)
lintro check --tool-options "ruff:line_length=88,prettier:print_width=80"

# Example with lists and booleans
lintro check --tool-options "ruff:select=E|F|W,ruff:preview=True"

# Exclude patterns
lintro check --exclude "*.pyc,venv,node_modules"

Environment Variables

Lintro reads the following environment variables at runtime. Most configuration is done through .lintro-config.yaml and CLI flags; these variables cover a few runtime overrides.

# Override the directory where run logs/artifacts are written (default: .lintro)
export LINTRO_LOG_DIR=/tmp/lintro-runs

# Timeout (seconds) for tool version checks; overrides
# execution.version_check_timeout (default: 30)
export LINTRO_VERSION_TIMEOUT=60

# Force Docker install-context detection (set to 1)
export LINTRO_DOCKER=1

# Opt in to loading external (third-party) plugins. Disabled by default.
export LINTRO_ENABLE_EXTERNAL_PLUGINS=1

# Force-clear discovery/config caches on each invoke. Accepted truthy values
# after trim + case-insensitive match: 1, true, yes, on.
export LINTRO_NO_CACHE=1

# AI config overlays (flag > env > .lintro-config.yaml > default). See
# docs/ai-features.md "Invocation overrides".
export LINTRO_AI_PROVIDER=cursor
export LINTRO_AI_MODEL=cursor-grok-4.6-high
export LINTRO_AI_TRANSPORT=cli
export LINTRO_AI_ENABLED=1
export LINTRO_AI_REVIEW=1
export LINTRO_AI_MAX_COST_USD=uncapped # sentinel; a positive number is a USD cap; overlay 0 is an error
export LINTRO_AI_PROVIDERS__CURSOR__TRUST_WORKSPACE=false # one ai.providers.<name>.<field> setting
VariableDescriptionDefault
LINTRO_LOG_DIRBase directory for run logs and artifacts.lintro
LINTRO_VERSION_TIMEOUTTimeout in seconds for tool version checks (must be >= 1)30
LINTRO_DOCKERForce Docker install-context detection when set to 1-
LINTRO_CONFIGShown in the lintro environment report; informational only-
LINTRO_ENABLE_EXTERNAL_PLUGINSOpt in to loading external (third-party) plugins (1/0)0
LINTRO_NO_CACHEForce-clear caches each invoke (1/true/yes/on)-
LINTRO_AI_PROVIDEROverride ai.provider (anthropic / cursor / openai). As a repository Actions variable it instead selects the dogfood review lane by id (anthropic, openai, cursor, zai, kimi; ADR-0011)-
LINTRO_AI_MODELOverride ai.model. As a repository Actions variable it overrides the selected dogfood lane’s default model-
LINTRO_AI_TRANSPORTOverride ai.transport (api / cli)-
LINTRO_AI_ENABLEDOverride ai.enabled (1/0/true/false)-
LINTRO_AI_REVIEWOverride ai.review (1/0/true/false)-
LINTRO_AI_MAX_COST_USDOverride ai.max_cost_usd (USD cap or uncapped; 0 is rejected — YAML 0 is a $0 cap, so never copy the value between the two surfaces)-
LINTRO_AI_PROVIDERS__<PROVIDER>__<FIELD>Override one ai.providers.<provider>.<field> setting, e.g. LINTRO_AI_PROVIDERS__CURSOR__TRUST_WORKSPACE. Provider and field are upper-cased and joined by a double underscore; an unknown provider or field is an error, not a silent no-op-

LINTRO_NO_CACHE is truthy after trim and case-insensitive match against 1, true, yes, or on.

Note: There is no environment variable for tool timeouts, verbosity, exclude patterns, output format, or auto-install. Use CLI flags (--exclude, --output-format, --auto-install) or .lintro-config.yaml for those settings. Auto-install is resolved from the --auto-install flag, then execution.auto_install_deps, then container auto-detection — not from an environment variable.

External Plugins (Trust Model)

Lintro can load third-party tool plugins published as Python packages that expose a lintro.plugins entry point. Because loading a plugin imports and executes its code, external plugins are disabled by default — a default installation never runs third-party plugin code at startup. This is a security boundary: any package installed in the same environment could otherwise execute arbitrary code every time Lintro runs. See SECURITY.md for the full threat model.

Enable external plugins only after you have reviewed and trust them, using either mechanism:

# .lintro-config.yaml
plugins:
  # Opt in and restrict loading to an explicit allowlist (recommended).
  # Names match the entry-point name or the distribution (package) name.
  trusted:
    - my-org-tool
    - another-plugin
  # Optional: enable loading of ALL discovered plugins (no allowlist).
  # Prefer 'trusted' over this blanket toggle.
  enabled: false

Equivalent pyproject.toml:

[tool.lintro.plugins]
trusted = ["my-org-tool", "another-plugin"]
enabled = false

Or, for a one-off/CI run, the environment variable:

export LINTRO_ENABLE_EXTERNAL_PLUGINS=1

Resolution rules:

  • Loading is enabled when LINTRO_ENABLE_EXTERNAL_PLUGINS is truthy or the plugins config opts in (a trusted allowlist is itself an opt-in, as is enabled: true).
  • When a trusted allowlist is present, only plugins whose entry-point name or distribution name is listed are loaded; all others are skipped and logged, regardless of how loading was enabled.
  • With no allowlist configured, enabling loads all discovered lintro.plugins entry points — use this only in fully trusted environments.
  • A global or project YAML file that cannot be read or parsed, or whose root is not a mapping, disables external plugin loading, even with LINTRO_ENABLE_EXTERNAL_PLUGINS=1. This includes empty and comment-only files. An empty mapping ({}) is valid.

Pre-Execution Summary

Before running tools, Lintro displays a configuration summary table showing the effective settings for the current run:

  • Environment: Local, Container, or CI
  • Auto-install: Whether auto-install is enabled (and the source — CLI flag, config, or container detection)
  • Tools: Which tools will run
  • Skipped tools: Which tools were skipped and why

This summary is shown for all output formats except JSON (--output-format json).

Skipped Tools

When tools are skipped, Lintro reports them in the summary table with a SKIP status and a note explaining the reason. Common skip reasons:

ReasonDescription
node_modules not foundNode.js deps missing and auto-install is disabled
disabled in configTool disabled via tools.<name>.enabled: false
not in enabled_toolsTool not in execution.enabled_tools; summarised as a count (names under --verbose or in JSON). Default/--tools all only; named --tools bypasses
deferred to <tool>Framework tool preferred (e.g., tsc to vue-tsc)
Version check messagesTool version below minimum required

Skipped tools do not affect exit codes — only tools that run and find issues contribute to a non-zero exit. The exceptions are a refused security scanner and strict mode, below.

Tool Versions: Refused, Older, Current

For each tool lintro knows two versions: the minimum, the oldest release lintro’s adapter works with (min_version in lintro/tools/manifest.src.json), and the pinned version, the one lintro installs and tests. A tool can also have a list of known-bad versions (known_bad_versions): releases that meet the minimum but give wrong results. Each entry has a version or range (versions), the reason and a reference. versions uses a deliberately small grammar, checked the same way when the manifest is generated and when lintro loads it: comma-separated clauses, each one of ==, !=, <, <=, > or >= followed by a plain numeric release such as 2.7.0, with a trailing .* allowed only after == and != ("==2.7.0", ">=2.4.0,<2.6.0", "==2.7.*"). Nothing else is accepted: no ~=, no pre-release, post-release, epoch or local parts.

The installed version falls into one of three cases:

  1. Refused: below the minimum, or on the known-bad list. Lintro does not run the tool and says why. Below the minimum, the message names the installed version and the command to upgrade (lintro install --upgrade <tool>). For a known-bad version it names the installed version, that it is refused, the reason and reference, and ends with Install <pinned version>, the version lintro tests.; lintro versions, lintro doctor (which marks the tool [XX]) and the MCP lintro_versions tool give the same hint. Lintro does not yet replace a known-bad version for you: lintro install treats it like any other installed version, so a known-bad release at or above the pin is reported as installed (#3567). Install the pinned version by hand. A refused security scanner (bandit, cargo-audit, cargo-deny, checkov, cppcheck, gitleaks, osv-scanner, pip-audit, semgrep, trufflehog: the tools whose tool_type includes SECURITY) fails the run: its row is UNAVAIL, the reason starts with security scanner did not run, and the exit code is 1, so a run without the scan never reads as a clean one. Any other refused tool is skipped, or fails the run under strict mode. Every report says the scanner did not run and why, never “No issues found”: the Markdown, HTML and plain-text reports and the CSV notes column print it, JSON carries status: unavailable with unavailable_reason, and SARIF adds an invocation with executionSuccessful: false and a toolExecutionNotifications entry instead of a finding. The same applies to any tool reported UNAVAIL, and to a tool that ran without a complete result. A security scanner whose version lintro cannot read (it runs, but prints no version lintro can parse, such as a source build that reports dev) is refused the same way, because neither the minimum nor the known-bad list can be checked: the run fails, and the reason quotes what the tool printed, on one line, trimmed and escaped. Install the pinned version to proceed. Any other tool whose version cannot be read still runs.
  2. Older than the pin: the tool runs as usual, and lintro prints one suggestion per tool per run, saying the installed version works, which version lintro tests, and the upgrade command (lintro install --upgrade <tool>). This is not a failure and does not change the exit code.
  3. The pinned version or newer: the tool runs, with no message.

A tool that sets no min_version uses its pinned version as the minimum, so for those tools only the pinned version or newer runs. A test fails if a tool’s pinned version is below its minimum or on its own known-bad list.

Strict Mode for Missing Tools

By default a tool that is not installed, or is older than Lintro’s minimum version, is reported as ⚠️ UNAVAIL / ⏭️ SKIP and the run still exits 0. A local run can then pass while CI, which has the tool, fails. Strict mode turns those rows into failures:

lintro check --strict-missing-tools
lintro format --strict-missing-tools
# .lintro-config.yaml
execution:
  strict_missing_tools: true

The flag overrides the config key for one run; --no-strict-missing-tools turns it off for a run when the config enables it.

Why the tool did not runDefaultStrict
Binary not found, or the version probe failedUNAVAIL, exit 0UNAVAIL, exit 1
Installed but below the minimum version, or known-badSKIP, exit 0UNAVAIL, exit 1
Same, for a security scannerUNAVAIL, exit 1UNAVAIL, exit 1
Security scanner whose version cannot be readUNAVAIL, exit 1UNAVAIL, exit 1
No files matched the tool’s patternsnot a failurenot a failure
disabled in config, not in enabled_tools, deferredSKIP, exit 0SKIP, exit 0
Missing project config or node_modules (e.g. vale)SKIP, exit 0SKIP, exit 0
Lintro refused the command (unreadable path, bad argument)failed, exit 1failed, exit 1

A strict failure names the tool, says why it could not run and ends with the install or upgrade hint, in the summary row and in JSON unavailable_reason. It is an execution failure, not a finding: issues_count stays 0, status is unavailable, unavailable is true and success is false. Findings from the tools that did run are reported as usual. Without strict mode the JSON is unchanged, so a below-minimum tool still reports status: skipped with its skip_reason, except a security scanner: a refused scanner reports status: unavailable and fails the run in either mode.

Strict mode applies to every tool the run selected: the tools named with --tools, or otherwise the tools the config enables (or, without a config, the tools picked by language detection). Narrow the set with --tools or execution.enabled_tools to make strict mode cover only the tools you expect to have installed. LINTRO_ALLOW_VERSION_LAG still lets a listed tool that is below its minimum run (for CI images that lag a pin bump), but never a version on the tool’s known-bad list: that stays refused. Nor does it let a security scanner with an unreadable version run: an unknown version cannot be shown to be merely lagging. A tool the override let run is marked in the results, not only in the log: its summary row’s Notes column reads below minimum, allowed by override, and its JSON metadata has a version_lag object (version, minimum, allowed_by) next to the matching note. --auto-install only installs Node.js project dependencies, so it does not install a missing tool.

“No files matched” covers Black too when it runs next to Ruff. Lintro decides whether Black or Ruff formats Python before it discovers files, but a Black that is missing or below the minimum only fails a strict run when the run has Python files for Black to check; otherwise its row reports no files, as it would for any other tool.

lintro review --with-lint reads the same config key (review has no flag). Its in-process lint pass over the changed files never fails the review on a missing tool, strict or not: the tool is counted as one that did not run, and the lint digest given to the model names it as Tool: <name> | unavailable: <reason>. <install hint>. The one difference strict mode makes there is that a below-minimum tool gets that line too, where without strict mode it is a skip and gets no line. A --lint-report saved from a strict lintro check run carries the same unavailable rows and gives the same digest.

Disabling a tool from pyproject.toml

The tools: section of .lintro-config.yaml has two equivalent pyproject.toml spellings — a flat per-tool table, or a nested tool/tools table:

[tool.lintro.trufflehog]
enabled = false

# Equivalent, mirroring the YAML `tools:` section
[tool.lintro.tool.trufflehog]
enabled = false

[tool.lintro.execution] and [tool.lintro.enforce] nested tables are equivalent to the YAML execution: / enforce: sections. Flat keys such as fail_fast under [tool.lintro] also work.

pyproject.toml is a fallback: when a .lintro-config.yaml exists, it is the only configuration source and these tables are not consulted.

Project Setup with lintro init

Run lintro init to detect project languages, select an install profile, and generate a .lintro-config.yaml tailored to your stack:

lintro init                        # auto-detect languages and write config
lintro init --minimal              # fewer defaults
lintro init --profile python       # use a specific profile
lintro init --force                # overwrite existing config

If a config file already exists, lintro init merges new tool entries without clobbering user-managed sections. Use --force to replace the file entirely.

After init, run lintro install --profile recommended and lintro doctor to install and verify tools.

Doctor: Config-Aware Health Checks

lintro doctor and lintro config treat execution.enabled_tools as the effective default selection and also respect per-tool tools.<name>.enabled settings. By default, disabled tools are shown separately and not counted as failures:

lintro doctor                      # check enabled tools only
lintro doctor --all                # check every manifest tool
lintro doctor --tools ruff,mypy    # explicit tools override config filtering
lintro doctor --json               # machine-readable output for CI

The --json output includes per-tool fields: installed, recommended, min_version, status (OK, MISSING, OUTDATED, INCOMPATIBLE, DISABLED, UNKNOWN), install_hint, and upgrade_hint. upgrade_hint is the install-strategy command (pin conflicts, uv vs pip, node package manager). Doctor, lintro versions --json, and MCP lintro_versions always include advisory (null when the tool is current). When present, that object has the detected update channel and a path-heuristic update_command. Execute upgrade_hint to change installs; update_command is diagnostic and can disagree with upgrade_hint when the binary path and the manifest strategy name different managers. binary_path is the tool binary resolved past cargo/bash wrappers. A standalone or unknown path does not inherit a pip/npm/cargo update_command from manifest install.type.

The human lintro versions table labels a tool OUTDATED when it meets the minimum but trails the recommended pin (below_recommended). JSON version_check_passed stays true in that case; only the table status string changed from PASS. The process still exits 0.

Node.js Package Manager Policy {#node-package-manager-policy}

lintro install used to pick bun whenever bun happened to be on PATH, and to install globally regardless of what the project said. In an npm-first repository that created two authorities: your own commands and your editor used the project’s local dependency, while lintro installed and upgraded a global one (#2005).

Which manager, in priority order:

  1. Explicit choice — lintro install --node-package-manager npm.
  2. packageManager metadata — the Corepack field in package.json ("packageManager": "pnpm@9.1.0").
  3. Lockfile evidence — bun.lock/bun.lockb, pnpm-lock.yaml, yarn.lock, package-lock.json, npm-shrinkwrap.json.
  4. Available manager — bun if installed, otherwise npm, then pnpm, then yarn. bun and npm are lintro’s own preference; pnpm and yarn are included so a machine that only has those still gets a command it can run. This is the only step where lintro’s own preference decides anything.

Availability does not veto the first three. If your project is npm-locked but only bun is installed, lintro still tells you to run npm install -D … rather than quietly writing a bun.lock into your repository.

Where it installs. Inside a Node project (anything with a package.json at or above the working directory), lintro adds a dev dependency — npm install -D <pkg>@<ver> — because the project owns its tool versions and a lockfile-pinned dependency is what Node.js Tool Resolution will run. Global installs are reserved for --global or for an environment with no project manifest at all (a bare CI runner, a container image, your $HOME). The upward search for a manifest stops at the first directory containing a .git entry, and never treats $HOME itself as a project root unless that is where you ran the command — a stray ~/package.json must never collect your tools.

Project pins are never replaced implicitly. If package.json declares a version that differs from lintro’s recommendation, --upgrade reports the difference and asks for an explicit decision instead of rewriting your manifest:

$ lintro install prettier --upgrade
  Node package manager: npm (from lockfile) → project dev dependency
  …
  prettier   Upgrade prettier explicitly: this project pins 3.1.0 in package.json but
             lintro recommends 3.9.4. Run `npm install -D prettier@3.9.4` to adopt
             lintro's version, or keep the project pin.

lintro sorts the declared spec into one of three classes by its shape alone. It does not resolve semver ranges against the registry; the project’s package manager does that.

  • Exact-compatible — a full version with at most one ^, ~ (or ~>) or = operator and at most one v, the way node-semver reads them. Build metadata (+build) is ignored, as npm ignores it. One that names the recommended version — 3.9.4, ^3.9.4, ~3.9.4, =3.9.4, v3.9.4, ^v3.9.4, 3.9.4+build — is not a conflict and upgrades normally. A different version, including ^3.9.0 that a resolver would satisfy with 3.9.4, is reported so you decide.
  • Range — >=3.9.4, 3.9.x, 3, *, 1.2.3 - 2.0.0, || unions. When the range can reach lintro’s minimum version for the tool, it is not a conflict: your range governs. A first install of a declared-but-missing package runs the project install (below). --upgrade does not rewrite the range: it asks you to update within it or pin lintro’s version. lintro reads both bounds of each || alternative, as npm’s semver.intersects does. When no release at or above the minimum lies inside any alternative (2.x, <3, ~2.8, 1 - 2, >=4 <3.5, >3.x <4), lintro reports it and runs nothing, because the project install would only end with a version lintro rejects. A prerelease upper bound counts as its release (<4.0.0-0 admits 3.x). A range whose answer depends on a prerelease it admits (>=3.9.5-rc.1 <=3.9.5-rc.3), or that lintro cannot parse, is reported the same way rather than installed. So is any range npm itself rejects — a leading zero (>=03.2.0), a number above JavaScript’s largest safe integer, a malformed prerelease or build suffix (>=3.2.0-01, >=3.2.0+foo..bar) — even when another || alternative is valid (>=3.2.0 || 3.x.5).
  • Opaque — workspace:*, npm: aliases, git and tarball URLs, local paths, dist-tags. lintro reports how the project manages the tool (“this project manages prettier via the workspace protocol (workspace:*) in package.json; lintro will not override it”) and leaves it to you.

Why ^3.1.0 is a conflict while >=3.1.0 is not, although both admit 3.9.4: a caret or tilde on a full version is how npm records the version a project actually adopted, so lintro compares that version with its own, and a difference is a decision for you. A comparator range such as >=3.1.0 states only a floor, and lintro leaves the choice within it to your package manager.

lintro enforces a minimum, not a ceiling. If your range lets the project install bring a version above the one lintro recommends (you declare >=4, lintro recommends 3.9.4, and npm install brings 4.x), the install is reported as a plain success: after it runs, lintro checks only that the installed version meets the tool’s minimum.

On a first install of a declared-but-missing exact-compatible match or range, lintro runs the manager’s install-all command (npm install, bun install, …) in the project root, so the declared version is restored from the lockfile rather than rewritten by a versioned add. That command installs every dependency the project declares, can update the lockfile and runs install scripts, so the plan says so, and lintro doctor --fix prints the same line before it runs the install:

$ lintro install prettier
  …
  To install (1):
    prettier             npm install
      installs the whole project's dependencies (`npm install` in /path/to/project), not only prettier

Erring toward asking is deliberate: the cost of a needless question is far below the cost of silently rewriting someone’s package.json.

Yarn Berry has no global install. Yarn 2 and later removed yarn global. When --global would use yarn inside a project whose packageManager names yarn@2 or later, or that has a .yarnrc.yml and no yarn version declared, lintro lists the tool for manual installation instead of planning yarn global add. The tags yarn@berry, yarn@stable and yarn@canary, and ranges whose lowest major is 2 or more (yarn@^4), count as Berry too: Corepack rejects them, and Yarn 1 refuses to run yarn global under a packageManager that does not name its own version. Yarn 1 keeps yarn global add only when there is no packageManager field or the field starts with yarn@1. (or yarn@0.), the check Yarn 1.22 itself makes before every command: yarn@1.22.22 and yarn@1.x work, while under yarn@1, yarn@^1.22.0 or yarn@>=1 every yarn command, yarn add included, exits with an error. lintro then lists the tool for manual installation and suggests no yarn command: set the field to an exact version such as yarn@1.22.22, or install the tool through your own setup.

Planning matches execution. The version probe for npm-installed tools resolves through the same chain a check uses, so lintro install reports on the binary lintro check will actually run rather than on whatever a bare name finds on PATH.

FlagEffect
--node-package-manager {bun,npm,pnpm,yarn}Force the manager, overriding packageManager and lockfiles.
--globalInstall npm-managed tools globally instead of as project dev dependencies.

Install Lock / Export

Use lintro install --write-lock to capture the resolved install plan:

lintro install --profile recommended --write-lock

This writes .lintro-install.lock.json containing every tool in the plan with its version, install hint, and status (to_install, to_upgrade, ok, outdated, manual, skipped), plus the selected profile and detected languages. Share this file with teammates or CI to reproduce the same tool set.

Tool Configuration

Lintro respects each tool’s native configuration files, allowing you to leverage existing setups.

Enforce Settings (Cross-Cutting Concerns)

The enforce tier contains settings that MUST be consistent across tools. These are injected directly as CLI flags to each tool, overriding their native configs.

enforce:
  line_length: 88 # Injected as --line-length (ruff, black) or --print-width (prettier)
  target_python: py313 # Injected as --target-version (ruff, black)

How CLI injection works:

ToolCLI Flag for line_lengthCLI Flag for target_python
Ruff--line-length 88--target-version py313
Black--line-length 88--target-version py313
Prettier--print-width 88N/A

Tools without CLI support:

Some tools (Yamllint, Markdownlint) don’t have CLI flags for line length. For these:

  • Use the defaults tier to provide fallback config
  • Or configure their native config files manually

Defaults Tier (Fallback Config)

The defaults tier provides fallback configuration for tools that have no native config file. This is useful for ensuring consistent settings without creating multiple config files.

defaults:
  prettier:
    semi: true
    singleQuote: true
    tabWidth: 2
    trailingComma: es5

  yamllint:
    extends: default
    rules:
      line-length:
        max: 88

  markdownlint:
    MD013:
      line_length: 88
      code_blocks: false
      tables: false

When defaults are applied:

  1. Lintro checks if the tool has a native config file (e.g., .prettierrc)
  2. If NO native config exists, Lintro generates a temp file from defaults
  3. If native config EXISTS, defaults are ignored (native config is used)

Tool Ordering Configuration

Execution order is not authored. Since #1742 it is derived from what each tool declares it touches and what it does to it, so it is complete, verifiable and the same everywhere lintro reports it. The scalar tool_order, tool_order_custom, tool_priorities and definition.priority settings are deleted; so is the [tool.lintro.post_checks] table, whose only real job — running black after ruff — now falls out of the model.

There is exactly one configurable input, and it is a tie-break rather than an order: execution.precedence names which of two tools that can write the same file has authority over the other. Everything else about the order still follows from the claims — see Write precedence.

Upgrading. Leftover tool_order, tool_order_custom, tool_priorities or [tool.lintro.post_checks] keys warn as unknown and are ignored; a run that carried them keeps working and needs no edit to succeed. The one hard break is lintro list-tools --show-conflicts, which is removed and now fails as an unknown option — use lintro check --explain-order to see what orders a run instead.

Derivation rules for phase edges — the per-pattern FIX → FORMAT → CHECK ordering. They are not the whole graph: a second class of edge, derived from the files each mutating tool would actually be handed, is added on top of them and is described under Write precedence. Where the two disagree the write-conflict edge is the one that decides, so read the “no edge” rows below as “no phase edge”.

RuleBehaviour
Phase per patternA tool occupies the earliest phase it holds there: FIX → FORMAT → CHECK
One invocationA tool that both fixes and checks a pattern sits in FIX; its diagnostics come out with it
EdgesEvery earlier-phase tool precedes every later-phase tool for that pattern
TiesEqual phases derive no phase edge; two writers that share a file still get a conflict edge
Broad claimsOnly * subsumes: *.py never joins the test_*.py group, though two writers of one test_a.py still conflict
Project-scopedA claim with no patterns (osv-scanner) derives no phase edge; a patternless writer conflicts with every writer under its roots
CyclesReported before ordering, naming the tools and the patterns whose edges closed them

The pairings this recovers include ruff → black on Python, oxlint → oxfmt on JS/TS, stylelint → prettier on CSS, prettier → html-validate on HTML and shfmt → shellcheck on shell.

Parallel runs use the same graph — both classes of edge — so two tools share a batch only when no derived edge separates them, so a mutator and a tool that must observe its writes never run concurrently.

Inspecting the order

lintro check --explain-order              # the order this run would use, then exit
lintro check --tools ruff,black --explain-order
lintro format --explain-order
lintro doctor                             # compact summary section
lintro config                             # the same order, as a table

--explain-order prints the order and exits without running a single tool. Tool selection is resolved exactly as the real run would resolve it, and the order comes from the same scheduler the run uses, so what you see is what would have executed.

Sample output:

Execution order (derived from tool claims)
  This is the order that runs. It is derived from what each tool claims to touch, not configured.

    1. ruff
        (unconstrained; alphabetical tiebreak)
    2. black
        after ruff — *.py: ruff(fix) -> black(format)
        after ruff — *.pyi: ruff(fix) -> black(format)

  Cycles (0): the derived graph is a DAG.

Format authority on Python

*.py is the one pattern in the 42-tool set with two mutating claimants. Black holds {FORMAT} and ruff holds {FIX, FORMAT}, so black owns the format phase (fewest mutating capabilities wins) and ruff is demoted to its fix capability: when black is selected and its resolved binary passes the version gate, ruff’s format / format_check stages are switched off unless you ask for them explicitly through --tool-options or [tool.lintro.ruff].

Mutate-then-verify (lintro format)

Since #1743 lintro format runs in two phases:

  1. Mutation. Every mutating capability (FIX, FORMAT) runs in derived DAG order.
  2. Verify. One pass runs the CHECK capability of the same tools. For every tool that declares CHECK, that single pass is the run’s authoritative residual count.

A tool’s own post-fix opinion is no longer the residual — it is replaced, not added, so no issue is counted twice. The figure the run displays is net resolved: issues detected before the mutation phase minus the residual measured after it. It is not called “fixed” because no tool reported it — it is the difference between two measurements, and a finding one tool fixed and another reintroduced nets out of it. The word “fixed” is kept only where a tool reports its own fix count.

The machine-readable keys for this figure, and for the third state below:

SurfaceKeyMeaning
JSON, per toolnet_resolvedBefore minus after; null when the residual is unknown
JSON, per toolremainingMeasured residual; null when the residual is unknown
JSON, per toolresidual_unknowntrue when the residual was not measured (fix or check run)
JSON, per toolresidual_unknown_reasonWhy — the check crashed, timed out or was skipped
JSON, run summarysummary.total_net_resolvedSum over the tools that were measured
JSON, run summarysummary.total_remainingSum over the tools that were measured
JSON, run summarysummary.residual_unknown_toolsTools the two totals above do not cover
JSONL stream, per toolnet_resolved_countPer-result net resolved; absent when the residual is unknown

The previous spellings still appear with the same values and are deprecated, to be removed in a later release: fixed per tool (read net_resolved), summary.total_fixed (read summary.total_net_resolved), fixed_issues_count in the JSONL stream (read net_resolved_count) and fixed_count in the MCP tool summary (read net_resolved).

Which tools the pass covers. Every mutating capability declares CHECK, so the central verify pass covers every tool that can rewrite a file, the four formatters that used to be FORMAT-only (prettier, oxfmt, rustfmt and shfmt) included since #2607. It is the only source of residuals: no tool keeps a private post-mutation recheck, and a tool’s own post-fix opinion is discarded, not added. Declaring CHECK does not change which tools lintro check runs — check-run selection has always included every registered tool; the capability is what the fmt run’s verify pass reads when it decides who reports residuals.

This is the only place cross-tool interference is visible. If ruff fixes a file and prettier then reformats it, ruff’s own post-fix lint already ran; a run-level pass sees the result of every mutating tool that ran before it.

Scope. Verifying every file again would double the cost of a format run, so the pass is narrowed by fingerprint (mtime + size, from lintro/utils/file_cache.py; the pass itself is lintro/tools/core/verify_pass.py): every file a mutating capability could be handed is stat’ed before the mutation phase and re-stat’ed after, and only the files whose fingerprint moved are verified. A file nobody rewrote keeps the issues it had before the run, so narrowing never loses a residual.

mtime over-approximates: a formatter rewriting a file to byte-identical content still bumps mtime, so a file may be re-verified needlessly. That is a wasted check, not a wrong answer. Size alone is near-useless (a quote-style rewrite is the same length) and serves only as a cheap tiebreak.

The floor. When fingerprints cannot be trusted — a stat that fails, or a filesystem with whole-second mtime granularity, where a rewrite inside the same second is invisible — the pass falls back to every file handed to a mutating capability. That is the documented floor, not a separate code path: the same verify pass runs over a wider set. The run reports which it used:

Verify pass: re-checking 12 changed file(s)
Verify pass: re-checking 340 file(s) (coarse mtime resolution)
Verify pass: re-checking 340 file(s) (some files could not be fingerprinted)

lintro check is unaffected and stays read-only: it takes no snapshot and runs no verify pass. So does lintro format --dry-run, which is a check-mode preview.

When the verify CHECK cannot answer — it was skipped by a version gate, it raised, or it timed out — the residual is unknown, a third state beside “clean” and “N remaining”. A timeout counts here even when the tool returned findings: a multi-root checker such as golangci-lint aggregates one result across module roots, so missing the deadline on one root leaves the others unchecked. An unknown residual fails the run, and it is never rendered as a measured after-count: the summary prints unknown in the net resolved and remaining columns with the reason beside it, and the JSON report carries "remaining": null, "net_resolved": null (and "fixed": null) plus "residual_unknown": true and "residual_unknown_reason". The run summary names every such tool in summary.residual_unknown_tools, because summary.total_net_resolved and summary.total_remaining cover only the tools that were measured — a zero there is never a claim about a tool in this state. The TOTALS table says the same thing with a Residual Unknown (tools) row. The tool’s pre-fix findings are still listed, because those were measured.

Mutation runs in parallel, in safe batches. Two mutating capabilities in flight over the same file would race on its bytes, so the scheduler keeps them out of the same batch — see Write precedence. Within a batch the full parallel fan-out applies under format exactly as it does under check.

Write precedence (overlapping mutators)

Two tools that can rewrite the same file must never run at the same time: each reads, rewrites and writes the whole file, so the second write silently discards the first tool’s edit. The derived scheduler closes that by deriving a second class of edge alongside the per-pattern FIX → FORMAT → CHECK ordering.

Overlap is decided by files, not by globs. Every mutating tool’s run-scoped candidate list is resolved the way the verify pass resolves it — the run’s paths, its excludes and --diff all apply — and canonicalised with realpath. Two writers conflict when those sets intersect. So Cargo.toml (clippy) relates to *.toml (taplo), and *.py relates to test_*.py, neither of which a string comparison of the patterns would ever find.

--incremental is the deliberate exception: it narrows what each tool is handed, but conflict planning ignores it and compares the unnarrowed sets. Narrowing can only remove edges, and the evidence it would rest on is a per-tool mtime cache — the same kind of evidence the verify pass keeps a documented floor for. An overlap missed because a cache called a file unchanged is a lost write; an overlap found for a file neither tool ends up touching costs one batch.

Three cases cannot be answered by a file list, and all three split the batch rather than risk a lost write:

  • a project-scoped writer — one that declares no patterns, or whose definition is partitionable=False (clippy, golangci-lint) — expands from the handed paths to a whole project root, so it conflicts with every writer under that root;
  • an unknown tool, meaning a name the registry cannot resolve, gets a batch of its own (a registered tool that deliberately declares no claims, such as commitlint, stays unconstrained as before);
  • a caller that names no scan paths (lintro config, lintro list-tools) has no candidate lists, so overlap falls back to asking whether two patterns could match one file.

Read-only capabilities never conflict. CHECK reads, so lintro check, lintro format --dry-run and the verify pass batch exactly as they did before this rule existed.

Who writes last. For a conflicting pair the winner is the authority: it runs last, so its write is the one that survives, and it keeps FORMAT. The winner is chosen by, in order:

  1. a configured override, execution.precedence;
  2. FIX before FORMAT — a fix rewrites structure and leaves layout dirty;
  3. the tool with fewer mutating capabilities runs last, so a dedicated formatter outranks a multi-capability tool (this is why black, not ruff, formats Python);
  4. the alphabetically last tool id runs last.

One format owner per overlapping scope. When several conflicting tools declare FORMAT, the scheduler names one of them the owner and records every other tool’s FORMAT as demoted for that scope. The demoted tool’s CHECK stays enabled, so it keeps reporting. The decision is re-resolved on every run, not frozen at lintro init, and the static scheduler record is printed by lintro doctor and lintro init. lintro check --explain-order and the run summary instead show the runtime Python formatting decision, including availability and explicit tool options:

  Format ownership (1):
    black owns Python formatting (available and version gate passed); ruff format_check not run

The static scheduler record sets the write order: the owner runs last, so where two formatters both rewrite a file its layout is the one left on disk. Python also has a runtime formatting decision: Ruff’s format and format_check stages are switched off by default only when Black is selected and runnable, unless an explicit Ruff tool option enables them. This decision is resolved once per run and used by tool configuration, the run summary and lintro check --explain-order. Other formatters’ demotion records control ordering and reporting; they do not switch off formatting stages.

Overriding write order. execution.precedence takes [winner, loser] pairs. The winner is ordered last on shared scopes and named as the owner in static scheduler reports, including those printed by lintro doctor and lintro init:

execution:
  precedence:
    - [ruff, black] # Order Ruff last; this does not enable Ruff's formatter

Precedence changes write order and the static scheduler record. It does not change the runtime Python formatting decision or re-enable Ruff’s formatting stages. Set Ruff’s format and format_check tool options explicitly to enable those stages; Black remains enabled when runnable. To use Ruff as the sole Python formatter, select Ruff without Black.

Contradictory pairs are a hard error, never a silent fallback. That covers a pair and its reverse:

Configured tool precedence is contradictory: both [ruff, black] and [black, ruff] appear
in execution.precedence. Keep one of the two pairs so the tools form an order rather
than a loop.

and a longer loop closed by several pairs:

Configured tool precedence is contradictory: one_fixer <-> two_fixer on *.py. Remove or
reverse one of the pairs in execution.precedence so the tools form an order rather than
a loop.

Performance shape. A broad-pattern mutator is a serialisation point: typos claims *, so it overlaps every other writer and is a batch of one until it narrows its claim. Pattern-disjoint groups stay parallel — ruff (*.py) and taplo (*.toml) still share a batch, and both of those are writers, which is what makes the example worth anything. Real projects mix file types, so two or three batches is the common case, and splitting when in doubt costs one batch while not splitting costs a lost edit.

Ruff vs Black Policy (Python)

Black owns Python layout whenever it is selected and runnable: its binary must resolve and pass the execution gate (including an explicit LINTRO_ALLOW_VERSION_LAG allowance). Module invocations such as python -m black also qualify. Ruff keeps linting and import sorting; both tools stay in the run.

  • lintro format: Ruff fixes lint issues with format=False; Black formats Python.
  • lintro check: Ruff checks lint with format_check=False; Black checks formatting.
  • If Black is missing, cannot run, or fails its version gate, Ruff’s format and format_check stay enabled by default, so Python formatting still happens when Ruff is runnable. Explicit Ruff options in config or --tool-options still control Ruff’s stages; enabling Ruff does not remove Black or change the final write order.

The run summary and lintro check --explain-order name the Python formatting owner and explain the fallback or demotion, using the actual probe diagnosis. The decision is resolved once per run without touching incremental file caches. If Black cannot be confirmed because its probe raises, Ruff remains enabled by default and Black does not run for that invocation. The original probe error remains a failing Black result, including in permissive missing-tool mode, so a later successful probe cannot enable a second writer or hide the failure. Missing Black retains its install hint and follows the configured strict missing-tool policy. CLI overrides are reflected in the explanation as well as the run summary. Formatting ownership is reported for read-only checks too, independently of write-conflict scheduling. If neither selected formatter is runnable (or Ruff formatting is explicitly disabled without runnable Black), the summary reports that Python formatting has no runnable owner.

Overrides when needed:

# Force Ruff to format during fmt
lintro format --tool-options ruff:format=True

# Force Ruff to include format check during check
lintro check --tool-options ruff:format_check=True

Rationale:

  • Avoids double-formatting churn (Ruff format followed by Black format) while preserving Ruff’s stricter lint rules (e.g., COM812, E501).
  • Black’s safe wrapping is preferred for long lines; Ruff continues to enforce lint limits during checks.

Node.js Tool Resolution {#nodejs-tool-resolution}

Every Node.js tool resolves the same way. There is one chain, implemented once in NodeJSBuilder (lintro/tools/core/command_builders.py), and it applies to astro check, commitlint, html-validate, markdownlint-cli2, oxfmt, oxlint, prettier, spectral, stylelint, svelte-check, tsc and vue-tsc alike:

  1. node_modules/.bin/<binary>, searched upward from the directory being checked until the nearest package.json or .git (whichever is hit first). A nested package with its own package.json stops there; a decoy node_modules above that boundary is ignored. This is the preferred answer: it is lockfile-pinned, offline, and it is the same binary your editor and your own npm run scripts use.

  2. the PATH-resolved absolute path of <binary> — a global install (bun add -g, npm install -g) or a Homebrew formula.

  3. bunx <package>@<pinned> / npx --yes --package <package>@<pinned> <binary> — a registry fetch at the version Lintro pins in its manifest. bunx is tried first, then npx. bunx keeps the short form when the executable name matches the package name (bunx prettier@<pinned>); it uses --package when they differ (bunx --package typescript@<pinned> tsc). npx always uses --yes --package so it cannot hang waiting for a TTY prompt.

    npx does not always run its pin. It reuses whatever npm finds installed or cached and then runs <binary> by name from any node_modules/.bin above the checked directory. A hoisted older copy, a pnpm store, a stale node_modules/.package-lock.json, a workspace glob npm reads differently, a pre-filled npm cache used offline, or npm config that selects a workspace can make it run another version, or nothing. Lintro guards the npx branch in three ways.

    Flags on the generated command. Every npx fallback runs as npx --yes, then --workspaces=false, --include-workspace-root=false, --bin-links=true, --global=false, --offline=false, --prefer-offline=false, --node-options=, --ignore-scripts and --cache=~/.lintro/cache/npx/<package>@<pinned>, then --package <package>@<pinned> <binary>. Each flag overrides the same setting from the environment (npm_config_*) and from the project, user and global npmrc files, so workspaces, bin-links, global, offline, prefer-offline, node-options, ignore-scripts and cache cannot change what runs. --ignore-scripts keeps dependencies’ install scripts from running, so an install holds exactly the files the registry published; npx still runs the tool itself. Of the npm tools Lintro pins, only spectral (@scarf/scarf, an analytics ping) and, on macOS, astro and spectral (fsevents, which ships a prebuilt binary) have dependencies with install scripts.

    Node preloads cannot replace the tool. npm hands its node-options setting to the tool as NODE_OPTIONS, and Node honours an inherited NODE_OPTIONS in both npm and the tool. A --require or --import preload set there could print an empty result and exit 0 instead of running the pinned tool. Under the npx fallback, on every platform:

    • --node-options= empties npm’s node-options from any npmrc file and from npm_config_node_options (any letter case, or spelled npm_config_node-options); Lintro also removes that variable from the tool’s environment.
    • Your own NODE_OPTIONS is filtered against an allowlist of flags that load no code. Boolean flags: --no-warnings, --no-deprecation, --trace-warnings, --trace-deprecation, --trace-uncaught, --enable-source-maps, --use-openssl-ca, --use-bundled-ca and --use-system-ca. Flags that take a value, written as --flag=value: --max-old-space-size=<MB>, --max-semi-space-size=<MB>, --stack-trace-limit=<n>, --disable-warning=<code> and --dns-result-order=<order>. The three numeric V8 flags also accept underscore spellings such as --max_old_space_size=4096.
    • Every other entry is dropped, including --require/-r, --import, --loader, --experimental-loader, --env-file and --inspect. An allowlist is used because a denylist misses any code-loading flag a later Node release adds. A value that uses double quotes or backslashes is dropped whole rather than re-parsed, and so is an entry joined to the next by a tab instead of a space. Lintro logs one warning per run naming the entries it dropped.
    • Some commonly set flags are dropped too, such as --openssl-legacy-provider, --experimental-strip-types, --experimental-vm-modules and --conditions. If a tool needs one of them, install the tool in the project (node_modules/.bin), put it on PATH, or use bun. Those routes are not the npx fallback and receive your NODE_OPTIONS unchanged.
    • The version check that runs before the tool gets the same filtered environment, so a preload cannot fake the version string it reads.
    • bunx, project-local and PATH binaries receive your NODE_OPTIONS unchanged. If a tool needs a preload, install it in the project.

    Path arguments stay literal. npx runs the tool through a shell (sh -c, or npm’s script-shell) and quotes an argument only when it contains characters such as spaces, *, ? or $. It leaves [, ], {, } and , bare, so a file named [slug].ts would glob to a neighbouring s.ts, and under a bash script-shell a{1,2}.ts would become a1.ts a2.ts. On Linux and macOS, Lintro therefore runs the tool as --script-shell=/bin/sh --package <package>@<pinned> --call '<binary> <args>', quoting every argument itself so the shell sees literals. On Windows npm uses cmd.exe, which does not glob, and the command is left as above. bunx, project-local and PATH binaries never go through a shell and are spawned unchanged.

    The shell is pinned too. npm reads script-shell from a repository .npmrc (the one in the directory the tool runs from, so a nested file counts), from npm_config_script_shell and from the user and global npmrc files. Whatever executable it names receives the tool’s command line, so it could print an empty result and exit 0 in place of the pinned tool. The --script-shell=/bin/sh flag takes precedence over every one of those settings, so on Linux and macOS a configured script-shell never runs under the npx fallback. It applies only to lintro’s own npx calls: your npm run scripts still use the shell you configured. The path is absolute on purpose, so a sh earlier on PATH cannot stand in for it; a host without /bin/sh fails the npx fallback loudly (spawn /bin/sh ENOENT) instead of falling back to another shell.

    Lintro’s own npm cache, checked before every run. Each pinned package gets its own cache directory, so a user cache that already holds something under npm’s _npx directory, or a cache value containing a PATH separator, is never used. Before the version check trusts the pin, Lintro inspects every _npx entry in that cache under npm’s own per-entry lock (concurrency.lock), so it never touches an entry while npx is installing it. An entry whose top-level package is not exactly the pin, is a symlink, is malformed, or whose .bin/<binary> points into another package is deleted, and npx reinstalls the pin. A correct entry is reused as is. A bad entry is renamed aside under a short unique .lintro-stale-… name while Lintro holds its lock, then removed. Several Lintro runs can repair the same cache at once. Lintro tries to delete leftovers from an interrupted run on the next run, both inside _npx and beside it. A leftover it cannot delete, for example because of its permissions, is logged as a warning and stays until it can be removed. It does not make the tool unavailable, because npx never runs it.

    Lintro never reclaims, moves or deletes a lock it did not create itself. If another process’s lock is there, Lintro waits up to 30 seconds. If that lock is abandoned (untouched for over 60 seconds), or still held after the wait, the tool is unavailable for that run, and the message names the exact concurrency.lock path, which can be deleted once no npm or npx process is running. Running npx itself also clears an abandoned lock. Lintro’s own lock is an empty directory like npm’s, so if a Lintro run is killed while holding it, npm’s own stale-lock handling cleans it up.

    Limitation: a Lintro run suspended while it holds a lock. npm treats a lock untouched for 60 seconds as abandoned. If a Lintro process is suspended for more than 60 seconds while it holds an npx cache lock, npm may treat the lock as stale and take it over. From then on Lintro cannot guarantee that it will not disturb npm’s operation. npm fails with ECOMPROMISED rather than running anything unexpected. Lintro limits the damage: it refuses the run instead of moving the entry. When it releases, it puts npm’s lock back without replacing anything (on macOS, Linux and Windows). Where that is not possible, npm’s lock is left under a .lintro-stale-… name with a warning.

    The tool is unavailable if the cache resolves outside ~/.lintro/cache, contains the platform’s PATH separator (: on Linux and macOS, ; on Windows, so C:\Users\… is fine), is not a directory, or has an entry npx could run that cannot be locked or repaired.

    Installed files checked against the lockfile. npx writes a package-lock.json into each _npx entry, recording the integrity hash of every package’s tarball, and keeps those tarballs in the same cache (_cacache). An entry is kept only when, for every package in its lockfile, the cached tarball matches that hash and every file npm extracts from it is installed with the same bytes. Two install-time rewrites npm makes are allowed exactly as npm makes them: a packed .gitignore becomes .npmignore, and a declared executable’s #! line loses a trailing CR. Each installed file must also be a regular file with no other hard link. The checks also refuse:

    • a file, directory link or node_modules that is not in the published package (bundled packages are checked against the tarball that bundles them);
    • a package directory that is not in the lockfile, or one reached through a symlink: node_modules itself, a scope directory or a parent package, at any depth;
    • a .bin executable that no locked package declares, such as a planted .bin/node. On Linux and macOS each must be a link to the declared file. On Windows each shim (<name>, <name>.cmd, <name>.ps1) must be byte for byte what npm’s cmd-shim writes for it. Lintro knows the shims npm 10 and 11 write and the ones npm 12 writes; a shim in any other format is refused as unrecognised (a newer npm may have written it; upgrade Lintro or install the tool in the project), and the entry is kept rather than reinstalled, since npm would write the same shim again.

    An entry that fails is removed like any other bad entry, so npx installs the pin afresh; an entry whose tarball is no longer cached is treated the same way.

    No node_modules Node could search. Node looks for a package an entry lacks (an optional dependency npm skipped, an optional peer, any undeclared require) in every node_modules above it, up to the filesystem root, and then in ~/.node_modules and ~/.node_libraries. Which requests a tool makes cannot be known in advance, so if any of those directories exists, for example a stray ~/node_modules or a /node_modules in a container, the npx fallback is refused for every tool, before npx starts, as an execution failure with a non-zero exit (never as an unavailable tool). This holds even when the project itself sits below that directory, as a project in your home folder does below ~/node_modules. The message names each directory: remove or rename it and run Lintro again. Lintro’s own Docker images have none.

    The check is repeated right before each npx spawn and is bound to the run. Lintro records the inode, size, mtime and ctime of everything in the entry. An entry whose record still matches one already verified in this process is not hashed again. If anything in the entry changed by the time the tool exits, the result is an execution failure with incomplete findings, never a pass. A file replaced and then put back also counts as a change, and so does moving the entry or _npx aside and back, which Lintro sees on the per-pin cache directory and _npx. The same applies to every refusal at spawn time, where npx never starts: the tool is reported as an execution failure with a non-zero exit, never as unavailable or skipped, even when the tool’s own error handling catches the refusal. An entry whose npm lock is held, because another npx is installing it, is waited for once, for at most the tool’s timeout or five minutes, whichever is shorter, with a warning naming the lock. A lock npm would call stale (untouched for 60 seconds) is not waited for: npx reclaims it. A lock dated in the future fails the run at once, since npm would wait on it for ever. If the lock is still held when the wait ends, the run is an execution failure naming the lock. A lock never makes the tool unavailable: the cache repair before the run skips an entry it cannot lock and leaves it to this check. On a cold cache, npx installs the pin during the run (npm checks the download against the registry’s integrity) and Lintro verifies the new entry once the run ends. That first run has nothing earlier to compare with, so a byte-identical swap made and undone while it runs is not detected; npx installs and runs in one process. On a warm cache the check costs about 0.1–0.25 s the first time in a process for html-validate (13 packages, 944 files) and 10–30 ms per spawn after that.

    One first install per pin at a time. npx leaves a new _npx entry unlocked for a moment after creating it, and again while it finishes writing it, so another Lintro run that reached the entry then could remove it from under npx or refuse it as broken. Lintro therefore keeps an OS file lock per pin, ~/.lintro/cache/npx/.<package>@<pinned>.lintro-install.lock. A run whose cache holds no entry yet takes it exclusively and keeps it until npx has exited and its install has been checked; other runs of that pin wait for it, then run the entry it installed. A warm cache is checked under a shared lock and npx runs without it, so warm runs never wait for one another. The cache repair before the run never waits for this lock: while a first install holds it, the repair leaves the cache alone. The wait counts against the same budget as the wait for npm’s lock (the tool’s timeout, at most five minutes); if it runs out, the run is an execution failure saying another Lintro run is still installing the pin. The operating system releases the lock when its holder exits, so a killed run never leaves one behind. On Windows the lock has no shared mode, so there warm checks of the same pin take turns.

    npx installs a cold pin and runs the tool in the same process, so the first run holds the exclusive lock for its whole tool run, not only for the install. A run that waits for it therefore fails once its own timeout runs out, even if the install itself finished earlier; this only happens while a pin is cold.

    A lock Lintro cannot use fails the run as an execution failure naming the lock path, never as an unavailable tool or a run without the lock. That covers a directory or a symbolic link at the lock path (the lock is never opened through a link), a directory Lintro cannot write, and a filesystem whose flock is unsupported, as some network and FUSE home directories are. Lintro’s cache location has no setting, so in that case make ~/.lintro/cache a symbolic link to a directory on a local filesystem: move the directory there and link ~/.lintro/cache to it. Lintro resolves the link before it checks the per-pin caches, so everything above works through it. (A link at a per-pin cache, ~/.lintro/cache/npx/<package>@<pinned>, is still refused.) The lock follows the file it was taken on, so after taking it Lintro checks that the file is still the one at the path, and otherwise pauses briefly and locks the new file instead. If the file never stays in place until the wait runs out, the run fails saying the lock kept being replaced. A first install checks once more right before npx starts and fails the run if the lock was deleted or replaced. Lintro never deletes the lock file itself. The limit: a process of the same user that deletes the lock while npx is installing lets another run take a fresh lock and meet the half-written entry; do not delete it while Lintro runs.

    A warm run cannot install a second entry unlocked without being caught. Each per-pin cache only ever sees one package spec, so npx always uses the same entry. If that entry is removed between a warm run’s check and npx starting, npx reinstalls it, and the check after the run reports the cache as changed, an execution failure.

    Trust model. Lintro’s npx cache (~/.lintro/cache/npx/<package>@<pinned>) is trusted the same way as Lintro’s own installation. The lockfile and the cached tarballs live in that same directory. The check catches a partial change, such as a replaced executable under an unchanged package.json. It cannot catch a local user who rewrites the lockfile, the tarball and the installed files so that they agree. Such a user can already change what runs, just as they could by editing Lintro itself or the project’s node_modules, and could likewise move a directory above the per-pin cache aside and back. NODE_PATH is not inspected. On Windows the change record relies on size, mtime and inode, because st_ctime there is the creation time.

    Refusal when npx could still reuse something. The pin is trusted only when all of these hold, and the tool is unavailable otherwise:

    • no node_modules directory exists in the checked directory or any directory above it, up to the filesystem root;
    • no package.json there or above declares workspaces (npm loads every member’s own node_modules from the workspace root), is the package itself, or fails to parse;
    • npm_config_workspace is not set in the environment, in any letter case. No flag clears that setting.

    The reason names what it found, says that npx may run an unpinned copy, and ends with Install <pkg>@<pinned> locally or install bun.

    npmrc conflicts fail loudly. Lintro does not read npmrc files. A setting there that no flag overrides, such as workspace=<name>, makes npm stop with its own error (in npm 11, Cannot use --no-workspaces and --workspace at the same time; npm 10 words it slightly differently) before the tool runs. Lintro reports that run as an execution failure: the result has execution_failed set, carries the runner’s message, and is never read as findings or as a pass. The same applies when the npx/bunx command exits with a failure and no output, or with command not found. Only runner commands are judged this way: a project-local or PATH binary whose own output mentions npm error keeps its own result.

    Trade-off: if npx is your only runner and a node_modules tree or a workspace root is in reach, the automatic registry fallback no longer runs for a Node tool you have not installed. Add the tool as a devDependency (branch 1), install it globally (branch 2), or install bun. bunx <pkg>@<pinned> always resolves from the registry and never runs the local tree, so it is not restricted.

  4. bare <binary> — last resort, fails if nothing is installed.

@latest is never resolved at runtime, for any tool. Branch 3 emits a one-time warning because it needs network access to the npm registry and imposes the pinned package’s own engines floor on your runtime; a failure on that branch is reported with install guidance rather than the tool’s raw error.

Which install should I use? A project devDependency (bun add -D <pkg> / npm install -D <pkg>) is the best answer for every Node tool — it wins the chain and pins the version through your lockfile. A global or Homebrew install is a valid fallback and is used whenever no project-local install is present.

Changed after v0.115.0 (#1811). The chain above used to apply only to html-validate. Other Node tools either went straight to bunx <binary>/npx <binary> (never consulting PATH, and resolving @latest) or preferred PATH ahead of any project-local install. Two consequences worth checking after upgrading:

  • A project-local install now wins. If a project pins an older tool version as a devDependency while you relied on a newer global one, Lintro now runs the local pin — the same version your editor runs. Remove the devDependency, or upgrade it, if you wanted the global.
  • prettier is no longer PATH-only. It previously had no Node builder at all and was resolved as a bare prettier name against PATH; a project’s lockfile-pinned prettier was never used. It now follows the same chain as everything else.

Also fixed on the way: commitlint and markdownlint-cli2 had no npx branch, so on a machine with npm but no bun a devDependency was unreachable and the tool reported a skip. Both now resolve like every other Node tool.

Because the version check (verify_tool_version) resolves through this same chain, from the same execution directory, the binary Lintro version-gates is the binary Lintro runs, for every Node tool rather than just for html-validate. For prettier, oxlint and oxfmt, execution reuses the command the check resolved instead of resolving it again. The other Node tools resolve again at execution, from the same directory, and get the same binary.

The version check never runs the registry fallback (branch 3). Running bunx <package>@<pinned> --version would download the package before any file is checked. When resolution falls through to bunx, or to a trusted npx (see above), the check reads the version from the runner’s <package>@<pinned> spec and compares it with the tool’s minimum, offline. The pin must be an exact version (MAJOR.MINOR.PATCH, optionally with a prerelease or build suffix), whether or not the tool declares a minimum. An exact pin that meets the minimum, or any exact pin when there is no minimum, lets the tool run through the runner. A pin below the minimum, or a spec that is unpinned, partial (1.2), a wildcard (1.x), a range (^1.2.3) or a dist-tag (latest), reports the tool as unavailable, and the runner is never started.

Python Tools

Ruff Configuration

File: pyproject.toml

[tool.ruff]
# Basic configuration
line-length = 88
target-version = "py313"
exclude = [
    ".bzr",
    ".direnv",
    ".eggs",
    ".git",
    ".mypy_cache",
    ".ruff_cache",
    ".venv",
    "__pypackages__",
    "migrations",
]

# Rule selection
select = [
    "E",   # pycodestyle errors
    "W",   # pycodestyle warnings
    "F",   # Pyflakes
    "I",   # isort
    "N",   # pep8-naming
    "D",   # pydocstyle
    "UP",  # pyupgrade
    "B",   # flake8-bugbear
    "C4",  # flake8-comprehensions
    "SIM", # flake8-simplify
]

ignore = [
    "D100", # Missing docstring in public module
    "D104", # Missing docstring in public package
]

# Per-file ignores
[tool.ruff.per-file-ignores]
"tests/**/*.py" = ["D100", "D103"]
"__init__.py" = ["F401"]

# Import sorting
[tool.ruff.isort]
known-first-party = ["lintro"]
force-single-line = true

# Docstring configuration
[tool.ruff.pydocstyle]
convention = "google"

Alternative: setup.cfg

[tool:ruff]
line-length = 88
select = E,W,F,I,N,D
exclude = .git,__pycache__,.venv

If Ruff cannot run, for example because it cannot parse pyproject.toml, it exits 2 and prints only its own error. lintro format --tools ruff then fails the run as an execution error that quotes Ruff’s message. It does not report “No fixes applied.” and does not claim that any file was inspected. A report Ruff did print but that Lintro could not fully parse stays a parse failure.

Mypy Configuration

  • Default run mode: --strict with --ignore-missing-imports enabled to avoid third-party stub noise (applied unless you override via set_options() or --tool-options).
  • Config discovery: mypy auto-discovers pyproject.toml [tool.mypy], mypy.ini, or setup.cfg [mypy] and the discovered config is passed via --config-file. When a native config provides exclude, Lintro does not add its default test/test_samples excludes; otherwise, it applies the defaults plus .lintro-ignore.
  • Recommended overrides when needed:
# Disable strict mode temporarily
lintro check --tools mypy --tool-options mypy:strict=False

# Surface missing-import errors (no ignore)
lintro check --tools mypy --tool-options mypy:ignore_missing_imports=False

# Pin target Python version
lintro check --tools mypy --tool-options mypy:python_version=3.13

Bandit Configuration

File: pyproject.toml

[tool.bandit]
exclude_dirs = ["tests", "venv", ".git"]
tests = ["B101,B102,B103"]  # Specific test IDs to run
skips = ["B101"]            # Test IDs to skip
confidence = "MEDIUM"       # Minimum confidence level
severity = "LOW"           # Minimum severity level

[tool.bandit.assert_used]
exclude = ["test_*.py"]     # Files to exclude from assert_used test

File: .bandit

[bandit]
exclude = tests,venv,.git
tests = B101,B102,B103
skips = B101
confidence = MEDIUM
severity = LOW

[[tool.bandit.assert_used]]
exclude = test_*.py

Available Options:

  • tests: Comma-separated list of test IDs to run
  • skips: Comma-separated list of test IDs to skip
  • exclude: Comma-separated list of paths to exclude
  • exclude_dirs: List of directories to exclude (pyproject.toml only)
  • severity: Minimum severity level (LOW, MEDIUM, HIGH)
  • confidence: Minimum confidence level (LOW, MEDIUM, HIGH)
  • baseline: Path to baseline report for comparison

A file Bandit’s own configuration excludes, for example through exclude_dirs in the file given as the configfile option, is not scanned and gets no per-file entry in Bandit’s report metrics. When that is true of every file Lintro passed, the run is reported as “no files”: it passes without claiming any file was inspected. When only some files are excluded, the run is an ordinary one.

Semgrep Configuration

Semgrep is a fast, open-source static analysis tool for security scanning and code quality enforcement across 30+ languages.

File: .semgrep.yaml or .semgrep.yml

rules:
  - id: custom-security-rule
    pattern: eval(...)
    message: 'Avoid using eval() - potential code injection'
    languages: [python]
    severity: ERROR

Available Options via --tool-options:

OptionTypeDescription
configstringRule config: auto, p/python, p/javascript, or path
excludelistPatterns to exclude from scanning
includelistPatterns to include in scanning
severitystringMinimum severity: INFO, WARNING, ERROR
timeout_thresholdintPer-file timeout in seconds
jobsintNumber of parallel jobs

Example Usage:

# Use Python security rules
lintro check --tools semgrep --tool-options "semgrep:config=p/python"

# Filter by severity
lintro check --tools semgrep --tool-options "semgrep:severity=ERROR"

# Exclude test files
lintro check --tools semgrep --tool-options "semgrep:exclude=tests/*|vendor/*"

Cppcheck Configuration

Cppcheck is a static analysis tool for C/C++ that detects undefined behavior, memory-safety defects, and other bugs. It is check-only (no auto-fix) and runs standalone on files without any build/project context.

Installation:

  • macOS: brew install cppcheck
  • Debian/Ubuntu: apt-get install cppcheck

Lintro runs Cppcheck over the files it discovers and drives it entirely through command-line options, so configuration goes through --tool-options. Cppcheck’s own project modes (--project=compile_commands.json, GUI project files) and suppression files are not wired into the Lintro integration.

Only source files (.c, .cpp, .cc, .cxx, .c++) are passed to Cppcheck. Headers handed to Cppcheck directly are analyzed as standalone translation units and misfire without the source that defines their macros and uses their declarations, so — as upstream’s manual recommends — Lintro lets Cppcheck reach headers through the sources that #include them. unusedFunction is likewise unsupported and rejected with a ValueError, as is all, which implies it: they need whole-program visibility, while Lintro invokes Cppcheck on the file list discovered for the run — a path argument, a --diff scope, or the whole tree — so functions would be reported unused merely because their callers were outside that list.

Lintro requires Cppcheck 2.13.0 or newer. Cppcheck ships no portable single binary, so the Docker image installs Debian’s package (currently 2.17.1 on trixie) and install-tools.sh uses apt or Homebrew. Distribution packages older than 2.13.0 are rejected by the version check; install from Homebrew or upstream in that case.

Available Options via --tool-options:

OptionTypeDescription
enablestring | listCheck categories forwarded to --enable=. Commas separate --tool-options entries, so several values are written pipe-separated (cppcheck:enable=warning|style). Default warning,style,performance,portability (error checks always run). unusedFunction and all are rejected.
inconclusiveboolReport findings cppcheck cannot fully confirm.
stdstringLanguage standard (e.g. c11, c++17).
inline_supprboolHonor inline // cppcheck-suppress comments.
suppressstring | listSuppression specifications forwarded to --suppress=, one flag per value. Several values are written pipe-separated (cppcheck:suppress=missingInclude|unusedStructMember).

Example Usage:

# Run with the default check set
lintro check src/ --tools cppcheck

# Enable only warnings, and assume C11. Options are comma-separated; the pipe
# is the list separator *within* one value.
lintro check src/ --tools cppcheck \
  --tool-options "cppcheck:enable=warning,cppcheck:std=c11"

# Enable several categories (pipe-delimited list inside one option)
lintro check src/ --tools cppcheck --tool-options "cppcheck:enable=warning|style"

# Include inconclusive findings and suppress missing-include noise
lintro check src/ --tools cppcheck \
  --tool-options "cppcheck:inconclusive=true,cppcheck:suppress=missingInclude"

Cppcheck’s structured output is parsed from its native XML report (schema version 2). SARIF output is available in recent versions but is lossy for cppcheck (it collapses style/performance/portability into a single warning level), so the native XML parser is used. See Cppcheck Analysis.

Gitleaks Configuration

File: .gitleaks.toml

# Custom rule example
[[rules]]
id = "custom-api-key"
description = "Custom API Key Pattern"
regex = '''custom_api_key_[a-zA-Z0-9]{32}'''
tags = ["key", "custom"]

# Allowlist to ignore false positives
[allowlist]
paths = [
    '''test_samples/''',
    '''\.git/''',
]
regexes = [
    '''EXAMPLE''',
    '''test_''',
]

Available Options:

OptionTypeDescription
no_gitbooleanScan without git history (files only)
configstringPath to custom gitleaks config file
baseline_pathstringPath to baseline file (ignore known secrets)
redactbooleanRedact secrets in output (default: true)
max_target_megabytesintegerSkip files larger than this size in MB

Usage Examples:

# Basic scan with default config
lintro check --tools gitleaks

# Scan with git history (not just files)
lintro check --tools gitleaks --tool-options gitleaks:no_git=False

# Use custom config file
lintro check --tools gitleaks --tool-options gitleaks:config=.gitleaks.toml

# Use baseline to ignore known secrets
lintro check --tools gitleaks --tool-options gitleaks:baseline_path=gitleaks-baseline.json

# Limit file size to scan
lintro check --tools gitleaks --tool-options gitleaks:max_target_megabytes=10

TruffleHog Configuration

TruffleHog is a secrets scanner with 800+ provider-specific detectors and optional live credential verification. Lintro runs it in filesystem mode. Verification is disabled by default (--no-verification) so default scans make no outbound network calls; verification can be re-enabled per run, in which case TruffleHog may contact third-party providers to test candidate credentials (accept that trade-off before enabling it). TruffleHog is configured via CLI options (there is no default config file).

Install: brew install trufflehog or GitHub Releases

Available Options:

OptionTypeDescription
no_verificationbooleanDisable live credential verification (default: true)
resultsstringFilter result type — single value (see note below)
configstringPath to a custom detector configuration file
exclude_pathsstringPath to a file of newline-separated exclude regexes
concurrencyintegerNumber of concurrent workers

Note: --tool-options uses commas to separate options, so a comma-separated results value (e.g. verified,unverified) cannot be passed on the CLI. Use a single value such as results=unverified, or leave it unset to report every result type.

Usage Examples:

# Basic scan (verification disabled by default)
lintro check --tools trufflehog

# Raise worker concurrency
lintro check --tools trufflehog --tool-options trufflehog:concurrency=8

# Only report unverified results (single value; commas are not CLI-safe here)
lintro check --tools trufflehog --tool-options trufflehog:results=unverified

# Explicitly enable live verification (makes network calls — off by default)
lintro check --tools trufflehog --tool-options trufflehog:no_verification=False

OSV-Scanner Configuration

OSV-Scanner is Google’s vulnerability scanner using the Open-Source Vulnerabilities (OSV) database. It scans lockfiles for known vulnerabilities across multiple ecosystems including PyPI, npm, Go, Rust, Ruby, PHP, .NET, and Java.

Install: go install github.com/google/osv-scanner/v2/cmd/osv-scanner@latest or download from GitHub Releases.

File: .osv-scanner.toml

# Ignore specific vulnerabilities (ignoreUntil is required for lintro classification)
[[IgnoredVulns]]
id = "GHSA-xxxx-xxxx-xxxx"
ignoreUntil = 2026-12-31
reason = "Not applicable to this project"

# Override package scanning behavior
[[PackageOverrides]]
name = "example-package"
ecosystem = "PyPI"
ignore = true
reason = "False positive"

Available Options:

OptionTypeDescription
timeoutintegerScan timeout in seconds (default: 120)
check_suppressionsbooleanRun probe scan to detect stale suppressions (default: true)

When check_suppressions is enabled, lintro runs a second osv-scanner scan without suppressions to classify each .osv-scanner.toml entry as Active (vulnerability still present), Stale (vulnerability resolved upstream — safe to remove), or Expired (past the ignoreUntil date). Results appear in the summary table Notes column and in JSON output under metadata.suppressions.

How lintro runs osv-scanner. Every scan is osv-scanner scan --recursive --format json --verbosity error --no-call-analysis=all plus --config .osv-scanner.toml when that file exists in the scan root or a parent. The suppression probe uses the same flags with --config /dev/null.

  • --verbosity error makes osv-scanner print only errors on standard error. A scan that went well prints nothing there, with or without findings, with or without an osv-scanner.toml of its own, and for a Go project scanned without Go installed.
  • --no-call-analysis=all turns off call analysis, which is on by default for Go only. It needs a working Go toolchain and fails with a multi-line govulncheck error when it cannot run. Turning it off does not change what lintro reports: the same vulnerabilities, the same finding count. It does change osv-scanner’s own exit code for a Go project whose vulnerabilities are all uncalled: with analysis osv-scanner exits 0 (it still lists them, marked uncalled in experimental_analysis), without it exits 1. lintro reads the report, not that exit code, so it reports those findings either way. For osv-scanner’s own all-uncalled test project (call-analysis-go-project-all-uncalled) at 2.7.1 with Go installed, osv-scanner exits 0 with analysis and 1 without, and lintro reports one finding (GO-2021-0053, grouped with its GHSA alias) and a failed check both with call analysis on, as earlier lintro releases ran it, and with it off.

Both flags exist from osv-scanner 2.4.0, older than any release lintro accepts. lintro passes no tool option to osv-scanner, so verbosity, call_analysis and no_call_analysis are refused as tool options rather than silently ignored.

When a scan is complete. A run is a complete scan only when stdout, without the whitespace around it, is exactly one JSON object that is a scan report: a results list and no top-level key other than those osv-scanner’s report has (results, experimental_config, experimental_generic_findings, image_metadata, license_summary, the same from 2.4.0 to 2.7.1). Text before or after the object, a second object, or an error key beside results is an incomplete run whose reason says the report could not be read. A top-level key outside that list is named in the reason. This is deliberate: if a later osv-scanner release adds a key to its report, every scan with that release is incomplete until lintro is updated to know the key. Findings are still read from such output and kept. One of these must also hold:

  • standard error is empty and osv-scanner exited 0, or exited 1 with vulnerabilities in the report;
  • everything on standard error is the one allow-listed message below (or an error for a file lintro excludes), at the exit code osv-scanner gives it: 127 without findings, 1 with them.

Every other run is incomplete: an execution failure with unknown inspection. The findings osv-scanner did report are kept, nothing is invented, the run cannot update or prune a baseline, and the output names the reason and quotes osv-scanner’s standard error verbatim:

OSV-Scanner reported an error (exit code 1), so the scan is incomplete. Its standard error:
Error during extraction: (extracting as javascript/packagelockjson) path/to/package-lock.json: could not extract: invalid character 'g' looking for beginning of value

That covers an unreadable or malformed lockfile (alone, or beside lockfiles that were read), an outage of the dependency-resolution service or of the OSV API, a broken --config file (exit 127), a broken osv-scanner.toml osv-scanner found itself (exit 130, Ignored invalid config file at ...), and any error text lintro has never seen. When a future osv-scanner prints a new error, lintro reports an incomplete run quoting it. This is deliberate: lintro does not try to judge errors it does not know.

“No package sources found” is a no-files run only when standard error is exactly the whole line osv-scanner 2.4.0 to 2.7.1 prints, No package sources found, --help for usage information., at exit 128, with no extraction error. The reason is No package sources found. Beside an extraction error it means a lockfile was there and could not be read, so that run is incomplete, and so is the line with anything before or after it.

Output that is not valid UTF-8 is decoded with replacement characters, so such an error is still quoted rather than lost.

The one allow-listed message. The transitive-dependency enricher reports a manifest whose indirect dependencies it could not resolve because the registry has no such package or version (a private package), or because no version satisfies the requirements:

Error during extraction: (extracting as transitivedependency/requirements) failed resolution for <path>: package System(7):<name>: not found

It is harmless only when the enricher is transitivedependency/requirements or transitivedependency/pomxml, <path> names one existing regular file, and the whole text after it is one of: package <key>: not found, version <key>[Concrete:<v>]: not found, the Maven form failed resolving {Maven:<group>:<artifact>[Concrete:<v>] {}}: followed by one of those, or resolution impossible: followed only by no candidates at all for: ... and requirements conflict: ... lines whose quoted text is a requirement specifier list ("==1.0.0,>=2.0": operators and versions, nothing else). That error ends with a newline, so osv-scanner prints one blank line after its last cause line. Several manifests continue the message on further failed resolution for lines, after that blank line when the previous one was unsatisfiable, and each is judged the same way; after the blank line nothing else continues the message. A transport failure (rpc error, max retries exhausted, a timeout) or any other text is an error. The listed packages were scanned, so the run is complete and carries a note in metadata.notes (see Tool Timeouts in the JSON Report). The note quotes each manifest’s message up to its first lines. With several manifests the quotes are numbered ([1] ...; [2] ...), and after five the rest are counted (; and 3 more).

Excluded paths. An error in an Error during extraction message is dropped only when it starts with one existing regular file under a path lintro excludes (.lintro-ignore or --exclude), matched as a finding for that file would be, and the whole text after that file is one of a fixed list of known messages:

  • a parser message osv-scanner 2.7.1 printed for a deliberately broken fixture of that file’s kind. The list holds explicit messages for Go’s JSON decoder (invalid character '/' looking for beginning of object key string, unexpected end of JSON input, json: cannot unmarshal number into Go struct field ... of type string), go-yaml (yaml: line 1: did not find expected ',' or ']'), BurntSushi/toml (toml: line 2 (last key "a"): Key 'a' has already been defined.), Go’s XML decoder (XML syntax error on line 1: element <project> closed by </foo>), go.mod (could not extract: <file>:2: unknown directive: foo) and the bare EOF and unexpected EOF of the pom.xml, conan.lock, renv.lock and packages.lock.json readers, each behind the wrapper its extractor prints (could not extract:, could not extract without a colon for bun.lock, could not extract pom from <file>: for pom.xml, failed to decode <name> file: for packages.lock.json, or none for packages.config). Only a message’s line and column numbers and its quoted or delimited tokens (a character such as ',', a key, an anchor, an element name, a version, a Go type) may differ from the captured text, each within a tight character set and length; every other word must match exactly. So yaml: line 1: permission denied and XML syntax error on line 1: connection refused are not on the list;
  • Open(<file>): open <file>: permission denied for the same file;
  • for a failed resolution for error, one of the allow-listed endings above.

The list is PARSER_MESSAGE_TEMPLATES in lintro/tools/osv_scanner/extraction_log.py, each entry next to the message it was captured from. A parser message that is not on it, for example one a newer osv-scanner prints, keeps the run incomplete until it is added. If an excluded fixture keeps a run incomplete with such a message, open an issue on lintro’s issue tracker quoting the line from the incomplete-run reason, the kind of file and the osv-scanner version (osv-scanner --version).

As a second, independent check, the error is kept whenever its text names any path other than that file: a word with a path separator, or a manifest or lockfile name or extension (package-lock.json, *.lock), other than the file itself or its own base name.

Any other text keeps the error, whatever entries the scan root holds, so vendor/a.lock: could not extract: yaml: line 1: failed reading app/package-lock.json: ... is quoted and the run is incomplete. A message that names no file, or a path that cannot be told apart from another file, is never dropped.

Known limits of excluding a path. Each case below stays an incomplete run:

  • Errors that run over several lines. lintro reads a message line by line and does not join an indented continuation line to the line above it. A pnpm-lock.yaml with the wrong value types prints yaml: unmarshal errors: followed by an indented line 3: cannot unmarshal ... line. That second line is read as a separate error that names no file, so the run stays incomplete even when the file is excluded. The same holds for a go.mod with a malformed replace line, whose usage text runs over two lines.
  • Resolution failures that are not on the allow-list. Excluding a manifest drops a failed resolution for error only when its ending is one of the allow-listed endings above. A transport failure while resolving an excluded manifest (rpc error, max retries exhausted, a timeout) keeps the run incomplete, and so does any other resolution error, such as the Maven invalid empty constraint below.
  • Messages lintro has not seen. An extractor or parser message that is not on the list (for example failed to parse Package.resolved: ...) is kept, by design. So is could not extract: strconv.ParseFloat: parsing "": invalid syntax, which a lockfile reader prints for a bad number: it comes from Go’s number parser, not from one of the file-format parsers above, and its wording does not show which input it read.

Repositories with broken test fixtures. A repository that keeps deliberately broken lockfiles or manifests as test fixtures (trivy, ossf/scorecard and osv-scanner’s own repository do) gets an incomplete run that quotes each of them, because osv-scanner cannot tell a fixture from a real lockfile. Exclude those paths: add the fixture directory to .lintro-ignore (for example testdata/) or pass it on the command line with --exclude testdata. Errors on the list above are then dropped, and so are any findings in them. The run is complete again only when every remaining error was dropped; the known limits above (a multi-line error, a resolution failure) still make it incomplete.

Minimum version. lintro requires osv-scanner 2.6.0 or newer (min_version in the tool manifest). osv-scanner 2.4.0 to 2.5.1 read only the first document of a two-document pnpm-lock.yaml (15 of 651 packages in vuejs/core, where 2.6.0 reads all 651 and reports 34 vulnerabilities). They exit 0 and print nothing on standard error, so the scan reads as complete and clean, and lintro cannot detect it. An older binary is refused as below the minimum, with the installed and required versions and the upgrade command. osv-scanner is a security scanner, so a refused binary fails the run instead of being skipped (see Tool Versions: Refused, Older, Current). Versions from 2.6.0 run. The minimum is not the pinned version in lintro/_tool_versions.py: the pin is the version lintro installs and tests, and a release between the minimum and the pin still runs.

Known limit. osv-scanner 2.7.0 treats an npm package with no resolved field in package-lock.json as local and never checks it. npm writes such lockfiles with omit-lockfile-registry-resolved=true. A one-package lockfile for body-parser 2.3.0 without resolved gives 0 vulnerabilities at 2.7.0 and 1 at 2.6.0 and 2.7.1. The bug is fixed in 2.7.1. lintro can refuse a known-bad version by name, but 2.7.0 is not on osv-scanner’s list yet: lintro itself still pins and tests 2.7.0, and the entry is added when the pin moves to 2.7.1 (#3556). Until then lintro runs 2.7.0. If you use 2.7.0, upgrade to 2.7.1.

Known limit. osv-scanner does not report every source it under-reads. A lockfile in a format version it does not support (for example "lockfileVersion": 99) is logged as “found 0 packages” with no error. Such a scan reads as complete; lintro cannot detect it.

Usage Examples:

# Scan for vulnerabilities in lockfiles
lintro check --tools osv_scanner

# With custom timeout for slow networks
lintro check --tools osv_scanner --tool-options "osv_scanner:timeout=300"

# Skip suppression staleness check
lintro check --tools osv_scanner --tool-options "osv_scanner:check_suppressions=false"

# Ignore vendored or nested checkouts (equivalent to a .lintro-ignore entry)
lintro check --tools osv_scanner --exclude ".claude"

Excluding lockfiles: osv-scanner performs its own recursive lockfile discovery, so lintro applies the resolved exclusion set — .lintro-ignore entries plus --exclude patterns — to the lockfile paths it reports. Both mechanisms use the same gitignore semantics as file discovery and yield identical results. Directory patterns (.claude, vendor/) drop every finding from that tree — useful when nested checkouts multiply the same finding — and file patterns (bun.lock, *.lock) suppress individual lockfiles.

The allow-list and its limit

lintro allow-lists one kind of osv-scanner error message. Every other message makes the run incomplete. That one kind is a transitive-dependency enricher reporting that the registry answered and the manifest’s indirect dependencies cannot be resolved: the registry has no such package or version (a private package), or no version satisfies the requirements. The exact endings are listed under “The one allow-listed message” above. For example:

Error during extraction: (extracting as transitivedependency/requirements) failed resolution for app/requirements.txt: package System(7):internal-pkg: not found

This message is harmless for three reasons. It comes from the project’s own manifest and stays the same on every run. The packages listed directly in that manifest were scanned; only their indirect dependencies were not. And osv-scanner cannot print this text after a transport failure: a lookup that failed on the network comes back as its own error (rpc error, max retries exhausted), not as not found.

The rule for the list. A message shape belongs on the list only when it is provably a property of the project’s own files and a network or registry failure cannot produce it. A message lintro does not recognise stays an incomplete run that quotes it. Adding a shape takes an explicit maintainer decision recorded in an issue, with source evidence that the text cannot come from a transport failure. A unit test pins the number of allow-listed endings, so a new one also changes that test.

Examined and rejected: Maven invalid empty constraint. square/okhttp’s maven-tests/pom.xml imports a BOM by a SNAPSHOT version range. osv-scanner 2.7.1 prints, at exit 127:

Error during extraction: (extracting as transitivedependency/pomxml) failed resolution for maven-tests/pom.xml: failed resolving {Maven:com.squareup.okhttp3:maven-tests[Concrete:1.0.0-SNAPSHOT] {}}: failed parsing version constraint 'Maven:com.squareup.okhttp3:okhttp-jvm[Requirement:]': invalid empty constraint

It looks like a property of the file, but it is not one. deps.dev’s Maven resolver ignores any error from fetching an imported BOM (util/maven/dependency.go, ProcessDependencies: if err != nil { continue }). A dependency whose version should come from that BOM keeps an empty version, and resolution then fails with this text. With osv-scanner 2.7.1 and a minimal pom that imports a BOM, an online run exits 0 with nothing on standard error; the same run with only Maven Central blocked exits 127 and prints this same line. lintro cannot tell the two apart, so such a project gets an incomplete run that quotes the line. Excluding that manifest (for example --exclude maven-tests) does not change this: the error is not on the allow-list, so lintro keeps it for an excluded manifest too. For a complete scan, make the BOM resolvable.

pip-audit Configuration

pip-audit is the Python Packaging Authority (PyPA) scanner for Python dependencies with known vulnerabilities. It queries the PyPI Advisory Database and OSV, complementing bandit (which scans source code) by scanning the dependency surface. It audits requirements*.txt files (via -r) and Python projects declared in pyproject.toml / setup.py.

Install: pip install pip-audit, uv add pip-audit, or brew install pip-audit.

File: none. pip-audit has no native config file; suppressions are passed on the command line by upstream and are not exposed via lintro.

Available Options:

OptionTypeDescription
timeoutintegerScan timeout in seconds (default: 120)

Notes:

  • pip-audit’s JSON output carries no severity field, so lintro reports severity as UNKNOWN.
  • Advisory IDs (PYSEC/GHSA/CVE) link to the corresponding osv.dev page.
  • Requirements discovery is recursive: nested files such as requirements/base.txt or services/api/requirements.txt are picked up, while vendored/generated trees (node_modules, .venv, venv, vendor, .git, __pycache__) are skipped. To audit a file outside this scope, pass it explicitly on the command line.

Ignoring an advisory:

# pyproject.toml
[tool.lintro.pip_audit]
# Each id is passed to pip-audit as --ignore-vuln. Pair every entry with a
# time-boxed [[IgnoredVulns]] row in .osv-scanner.toml that names the same id
# (or lists it as an alias in its reason), so both scanners agree and the
# ignore carries a reason and an expiry.
ignore_vulns = ["GHSA-xxxx-xxxx-xxxx"]

The same list can be passed once with --tool-options "pip_audit:ignore_vulns=ID|ID" (pipes separate ids, since commas separate options).

Usage Examples:

# Scan requirements and project manifests for vulnerable dependencies
lintro check --tools pip_audit

# With a longer timeout for slow networks
lintro check --tools pip_audit --tool-options "pip_audit:timeout=300"

pydoclint Configuration

File: pyproject.toml

[tool.pydoclint]
style = "google"
arg-type-hints-in-docstring = false
arg-type-hints-in-signature = true
check-return-types = false
check-arg-order = true
skip-checking-short-docstrings = true

Available Options:

  • style: google, numpy, sphinx
  • arg-type-hints-in-docstring: Require types in docstring (default: true)
  • arg-type-hints-in-signature: Require type annotations (default: true)
  • check-return-types: Validate return types match (default: true)
  • check-arg-order: Verify argument order matches signature
  • skip-checking-short-docstrings: Skip single-line docstrings

import-linter Configuration {#import-linter}

Tool: import-linter (binary lint-imports) — checks architectural import contracts for a Python package.

Install: uv pip install 'lintro[full]' or uv pip install import-linter

File: pyproject.toml (also reads .importlinter and setup.cfg)

[tool.importlinter]
root_package = "mypkg"

[[tool.importlinter.contracts]]
name = "Layered architecture"
type = "layers"
layers = ["mypkg.api", "mypkg.services", "mypkg.storage"]

[[tool.importlinter.contracts]]
name = "CLI must not be imported by the core"
type = "forbidden"
source_modules = ["mypkg.core"]
forbidden_modules = ["mypkg.cli"]

Behaviour in Lintro:

  • Project-scoped: the tool runs once per invocation against the whole import graph, regardless of how many files were passed.
  • Configuration is discovered by walking upward from the given paths; the tool then runs from the config file’s directory so the root package is importable.
  • A project with no import-linter configuration reports a clean result rather than an error, so the tool is safe to leave enabled.
  • When lint-imports exits non-zero without a complete contract report (an ignore_imports entry that matches nothing under unmatched_ignore_imports_alerting = "error", a root package that cannot be imported, a misconfigured contract, a crash), the run is an execution failure, not a finding. It fails with execution_failed set and no invented issue, and the console, Markdown and JSON output show import-linter failed (exit N) running: with the command and the tool’s own message. Console and Markdown keep the first 20 and last 40 lines of a longer message and say how many were omitted; JSON keeps all of it. Chains printed before a crash are still reported. A timeout is reported as a timed-out run instead. A pyproject.toml that cannot be parsed is skipped during config discovery, before lint-imports runs.
  • Every built-in contract type is parsed into one issue per chain, including acyclic_siblings, whose relative dependencies (.b -> .a) are reported as absolute module paths. Contracts that share a name are reported separately.
  • Check-only. lintro format never runs import-linter.

Available --tool-options:

  • timeout: Seconds to allow the graph build and contract check (default: 60)

Usage:

lintro check .
lintro check . --tools import-linter

Contract syntax and every contract type are documented upstream at https://import-linter.readthedocs.io/en/stable/contract_types/.

pylint Configuration {#pylint}

Tool: pylint — Python static analyser. Lintro wires it in mainly for duplicate-code (R0801), the copy-paste detector no other bundled tool provides.

Install: uv pip install 'lintro[full]' or uv pip install pylint

File: pylint reads the first of these that declares pylint configuration, in this precedence order: pylintrc, pylintrc.toml, .pylintrc, .pylintrc.toml, pyproject.toml, setup.cfg, tox.ini. Lintro discovers the same file and passes it as --rcfile.

[tool.pylint.main]
disable = ["all"]
enable = ["duplicate-code"]
jobs = 0

[tool.pylint.similarities]
min-similarity-lines = 12
ignore-comments = true
ignore-docstrings = true
ignore-imports = true

Behaviour in Lintro:

  • Project-scoped: every discovered file is passed to a single pylint invocation. Cross-module checkers only see clones that appear in one run, so per-file execution would silently miss every R0801.
  • Configuration is discovered by walking upward from the given paths and is passed as --rcfile. With no pylint configuration anywhere above the paths, pylint’s built-in defaults apply — which overlap heavily with ruff, so configure it explicitly.
  • The R0801 message body (the file list plus the duplicated source block) is preserved verbatim; it is the only description of what is duplicated.
  • pylint’s message category becomes the Lintro severity: fatal/error are ERROR, warning and refactor (which includes duplicate-code) are WARNING, and convention/info are INFO.
  • Check-only. lintro format never runs pylint.

Available --tool-options:

  • disable: Message or category to disable, forwarded to --disable=. Commas separate --tool-options entries, so several values are written pipe-separated (pylint:disable=C0114|R0801)
  • enable: Message or category to enable, forwarded to --enable=. Several values are written pipe-separated (pylint:enable=duplicate-code|C0114)
  • timeout: Seconds to allow the run (default: 900; a whole-repo pylint run is slow)

Usage:

lintro check .
lintro check . --tools pylint
lintro check . --tools pylint --tool-options "pylint:disable=all,pylint:enable=duplicate-code"
# Several message ids in one option: pipe-separated, because commas split entries
lintro check . --tools pylint --tool-options "pylint:enable=duplicate-code|C0114"

Every message id and symbol is documented upstream at https://pylint.readthedocs.io/en/stable/user_guide/messages/messages_overview.html.

Frontend Tools

Prettier Configuration

Prettier handles formatting for CSS, HTML, JSON, YAML, Markdown, and GraphQL files.

Note: JavaScript and TypeScript files are handled by oxfmt for better performance (30x faster). See Oxfmt Configuration for JS/TS formatting options.

File: .prettierrc

{
  "tabWidth": 2,
  "useTabs": false,
  "semi": true,
  "singleQuote": true,
  "quoteProps": "as-needed",
  "trailingComma": "es5",
  "bracketSpacing": true,
  "arrowParens": "avoid",
  "printWidth": 80,
  "endOfLine": "lf"
}

File: prettier.config.js

module.exports = {
  tabWidth: 2,
  semi: true,
  singleQuote: true,
  trailingComma: 'es5',
  bracketSpacing: true,
  arrowParens: 'avoid',
  printWidth: 80,

  // Override for specific file types
  overrides: [
    {
      files: '*.json',
      options: {
        tabWidth: 4,
      },
    },
    {
      files: '*.md',
      options: {
        printWidth: 120,
        proseWrap: 'always',
      },
    },
  ],
};

File: package.json

{
  "prettier": {
    "tabWidth": 2,
    "semi": true,
    "singleQuote": true
  }
}

Ignore Files: .prettierignore

node_modules/
dist/
build/
coverage/
*.min.js
*.min.css

TypeScript Tools

TypeScript Compiler (tsc) Configuration

The TypeScript Compiler provides static type checking for TypeScript projects. Lintro wraps tsc --noEmit to check types without generating output files.

Installation:

# Homebrew (macOS/Linux)
brew install typescript

# npm
npm install -D typescript

# bun
bun add -D typescript

A project devDependency is preferred: a type checker must match the project’s own TypeScript version, because a different compiler reports different diagnostics. A global or Homebrew tsc is used when the project has no local install. See Node.js Tool Resolution.

File: tsconfig.json

{
  "compilerOptions": {
    "target": "ES2020",
    "module": "ESNext",
    "strict": true,
    "skipLibCheck": true,
    "noEmit": true
  },
  "include": ["src/**/*"],
  "exclude": ["node_modules", "dist"]
}

Available Options via --tool-options:

OptionTypeDescription
projectstringPath to tsconfig.json (—project)
strictbooleanEnable all strict type checking options
skip_lib_checkbooleanSkip type checking of declaration files (default: true)
timeoutintegerExecution timeout in seconds (default: 60)

Usage Examples:

# Basic type check (uses tsconfig.json if present)
lintro check src/ --tools tsc

# Enable strict mode
lintro check src/ --tools tsc --tool-options "tsc:strict=True"

# Use specific config file
lintro check src/ --tools tsc --tool-options "tsc:project=tsconfig.build.json"

# Disable library check for faster execution
lintro check src/ --tools tsc --tool-options "tsc:skip_lib_check=True"

# Combine with other JS/TS tools
lintro check src/ --tools tsc,oxlint,oxfmt

Oxlint Configuration

Oxlint is a fast JavaScript/TypeScript linter (50-100x faster than ESLint) with 661+ built-in rules from ESLint, TypeScript, React, JSX-a11y, Unicorn, and more.

Native Config Detection:

Lintro detects these oxlint config files:

  • .oxlintrc.json
  • oxlint.json

When a native config exists, Lintro uses it automatically and skips generating defaults.

Installation:

# bun (recommended)
bun add -D oxlint

# npm
npm install -D oxlint

Lintro prefers the project’s own node_modules/.bin/oxlint, then a binary on PATH, then a version-pinned bunx/npx fetch, so a global or Homebrew install works too. See Node.js Tool Resolution.

File: .oxlintrc.json

{
  "rules": {
    "no-debugger": "error",
    "no-console": "warn",
    "eqeqeq": "error"
  },
  "plugins": ["react", "unicorn"],
  "ignorePatterns": ["dist/**", "node_modules/**"]
}

Available Options via --tool-options:

OptionTypeDescription
configstringPath to config file (—config)
tsconfigstringPath to tsconfig.json (—tsconfig)
allowlist[str]Rules to allow (turn off)
denylist[str]Rules to deny (report as errors)
warnlist[str]Rules to warn on (report as warnings)
quietbooleanSuppress warnings, only report errors (—quiet)
timeoutintegerExecution timeout in seconds (default: 30)

Usage Examples:

# Basic check
lintro check --tools oxlint

# Auto-fix issues
lintro format --tools oxlint

# Suppress warnings (errors only)
lintro check --tools oxlint --tool-options "oxlint:quiet=True"

# Deny specific rules (report as errors)
lintro check --tools oxlint --tool-options "oxlint:deny=no-debugger|no-console"

# Allow specific rules (ignore them)
lintro check --tools oxlint --tool-options "oxlint:allow=no-unused-vars"

# Use custom config file
lintro check --tools oxlint --tool-options "oxlint:config=.oxlintrc.custom.json"

# Specify tsconfig for TypeScript projects
lintro check --tools oxlint --tool-options "oxlint:tsconfig=tsconfig.app.json"

Stylelint Configuration

Stylelint is a mighty, configurable linter and fixer for CSS, SCSS, Sass, and Less stylesheets, with 100+ built-in rules and --fix support.

Stylelint requires a configuration to run. When no config is resolvable, Lintro skips stylelint as a non-error (rather than surfacing stylelint’s hard ConfigurationError).

Native Config Detection:

Stylelint resolves configuration per file (walking upward). Lintro supports:

  • .stylelintrc, .stylelintrc.json, .stylelintrc.yaml, .stylelintrc.yml
  • .stylelintrc.js, .stylelintrc.cjs, .stylelintrc.mjs
  • stylelint.config.js, stylelint.config.cjs, stylelint.config.mjs
  • a stylelint key in package.json

.stylelintignore (and the ignoreFiles config key) is honored by the underlying tool. When Stylelint’s own ignore configuration excludes every file it was given, the run is reported as “no files”: it passes without claiming any file was inspected. Lintro passes --allow-empty-input, so a run excluded by .stylelintignore prints an empty report instead of failing on Stylelint’s AllFilesIgnoredError, and a run excluded by ignoreFiles reports every file as "ignored": true. Lintro reads both as “no files”. When only some files are ignored, the run is an ordinary one. Stylelint reads glob characters in an existing path literally, so a name like [slug].css is linted as usual, but it turns a backslash into /. On POSIX systems, where a backslash can be part of a file name, it would read dir\file.css as dir/file.css: it would skip the named file, or check and --fix a different one. On POSIX, Lintro never passes such a path to Stylelint. It runs Stylelint on the other files, keeps their findings and fixes, and fails the run as an execution error that names the files left uninspected. If every path holds a backslash, Stylelint is not run at all. On Windows a backslash is always a path separator, so these paths are passed to Stylelint as usual. A report holding malformed or non-empty ignored records also fails instead of being read as “no files”.

Installation:

# bun (recommended, with a shareable config)
bun add -D stylelint stylelint-config-standard

# npm
npm install -D stylelint stylelint-config-standard

Lintro prefers the project’s own node_modules/.bin/stylelint, then a binary on PATH, then a version-pinned bunx/npx fetch, so a global install works too. See Node.js Tool Resolution.

File: .stylelintrc.json

{
  "extends": ["stylelint-config-standard"],
  "rules": {
    "color-hex-length": "short",
    "block-no-empty": true,
    "declaration-block-no-duplicate-properties": true
  }
}

Available Options via --tool-options:

OptionTypeDescription
configstringPath to a stylelint config file (--config)
verbose_fix_outputbooleanInclude raw stylelint output in fix()
timeoutintegerExecution timeout in seconds (default: 30)

Usage Examples:

# Basic check
lintro check styles/ --tools stylelint

# Auto-fix issues
lintro format styles/ --tools stylelint

# Use a specific config file
lintro check styles/ --tools stylelint --tool-options "stylelint:config=.stylelintrc.json"

# Increase timeout for large stylesheets
lintro check styles/ --tools stylelint --tool-options "stylelint:timeout=60"

Oxfmt Configuration

Oxfmt is a fast JavaScript/TypeScript formatter (30x faster than Prettier) that provides Prettier-compatible formatting with minimal configuration.

Native Config Detection:

Lintro detects these oxfmt config files:

  • .oxfmtrc.json
  • .oxfmtrc.jsonc (supports comments)

When a native config exists, Lintro uses it automatically and skips generating defaults.

Installation:

# bun (recommended)
bun add -D oxfmt

# npm
npm install -D oxfmt

Lintro prefers the project’s own node_modules/.bin/oxfmt, then a binary on PATH, then a version-pinned bunx/npx fetch, so a global or Homebrew install works too. See Node.js Tool Resolution.

File: .oxfmtrc.json or .oxfmtrc.jsonc

{
  "printWidth": 100,
  "tabWidth": 2,
  "useTabs": false,
  "semi": true,
  "singleQuote": true,
  "trailingComma": "es5"
}

Available Options via --tool-options:

OptionTypeDescription
configstringPath to config file (—config)
ignore_pathstringPath to ignore file (—ignore-path)
timeoutintegerExecution timeout in seconds (default: 30)

Note: Formatting options (printWidth, tabWidth, useTabs, semi, singleQuote) are only supported via config file (.oxfmtrc.json), not CLI flags.

Usage Examples:

# Basic check
lintro check --tools oxfmt

# Format files
lintro format --tools oxfmt

# Use custom config file
lintro format --tools oxfmt --tool-options "oxfmt:config=.oxfmtrc.custom.json"

# Use custom ignore file
lintro format --tools oxfmt --tool-options "oxfmt:ignore_path=.oxfmtignore"

# Increase timeout
lintro format --tools oxfmt --tool-options "oxfmt:timeout=60"

API Description Tools

Spectral Configuration

Spectral is a linter for OpenAPI (2.0/3.0/3.1), AsyncAPI, and JSON Schema documents. It is check-only (no autofixer) and requires a ruleset. Lintro discovers a supported ruleset upward from the target (or uses the ruleset option) and skips as a non-error when none is found. With a ruleset, Spectral checks every matching *.yaml, *.yml, and *.json file. Lintro always supplies Spectral’s internal --ignore-unknown-format flag so non-API documents do not produce format warnings; the flag is not a --tool-options setting.

Spectral is intentionally absent from the language map: enabling it for every YAML or JSON project would be too broad. A native .spectral.* file at a scan root selects it on a no-config first run; after lintro init, add spectral to execution.enabled_tools. Users can also name it with --tools spectral; once selected, Spectral still skips unless discovery or the ruleset option finds a ruleset.

Native Config Detection:

Lintro detects (and Spectral requires) one of these ruleset files:

  • .spectral.yaml
  • .spectral.yml
  • .spectral.json
  • .spectral.js

Installation:

# bun (recommended)
bun add -D @stoplight/spectral-cli

# npm
npm install -D @stoplight/spectral-cli

Lintro prefers the project’s own node_modules/.bin/spectral, then a binary on PATH, then a version-pinned bunx/npx fetch. See Node.js Tool Resolution.

Node runtime requirement: the pinned Spectral CLI (currently 6.17.0) declares engines: { "node": "^22.0 || >= 24.0" }. Any consumer that installs it, or that reaches the bunx/npx fallback, needs a Node runtime satisfying that range — Node 18, 20, and 21 are not supported. Size your CI matrix accordingly.

File: .spectral.yaml

extends: ['spectral:oas'] # or ["spectral:asyncapi"]

Available Options via --tool-options:

OptionTypeDescription
rulesetstringExplicit path to a ruleset (overrides discovery)
timeoutintegerExecution timeout in seconds (default: 30)

Usage Examples:

# Lint an OpenAPI document (rulesets are discovered upward from the target)
lintro check --tools spectral openapi.yaml

# Use an explicit ruleset
lintro check --tools spectral --tool-options "spectral:ruleset=.spectral.custom.yaml"

Web Framework Tools

Astro Check Configuration

Astro Check is Astro’s built-in type checking command that provides TypeScript diagnostics for .astro files including frontmatter scripts, component props, and template expressions.

Installation:

# bun (recommended)
bun add -D @astrojs/check

# npm
npm install -D @astrojs/check

astro check needs @astrojs/check, and Lintro runs Astro with CI=1 so its interactive “install @astrojs/check?” prompt cannot complete. Add that package as a devDependency; astro is already a production dependency in an Astro project, and installing it with -D would move it out of dependencies. A project-local install of @astrojs/check is strongly preferred here; see Node.js Tool Resolution.

Native Config: astro.config.mjs, astro.config.ts, or astro.config.js

Astro check uses your project’s astro.config and tsconfig.json for configuration. No additional configuration is needed for Lintro.

Available Options via --tool-options:

OptionTypeDescription
rootstringRoot directory for the Astro project
timeoutintegerExecution timeout in seconds (default: 120)

Usage Examples:

# Check Astro project
lintro check src/ --tools astro-check

# Check with specific root directory
lintro check . --tools astro-check --tool-options "astro-check:root=./packages/web"

# Auto-install dependencies before checking
lintro check src/ --tools astro-check --auto-install

Svelte Check Configuration

Svelte Check is the official type checker and linter for Svelte components. It provides TypeScript type checking, unused CSS detection, and accessibility hints for .svelte files.

Installation:

# bun (recommended)
bun add -D svelte-check

# npm
npm install -D svelte-check

Native Config: svelte.config.js or svelte.config.ts

Svelte Check uses your project’s svelte.config and tsconfig.json for configuration. No additional configuration is needed for Lintro.

Available Options via --tool-options:

OptionTypeDescription
thresholdstringMinimum severity to report: error or warning (default: warning)
tsconfigstringPath to tsconfig.json file
timeoutintegerExecution timeout in seconds (default: 120)

Usage Examples:

# Check Svelte project
lintro check src/ --tools svelte-check

# Check with warning threshold
lintro check src/ --tools svelte-check --tool-options "svelte-check:threshold=warning"

# Check with specific tsconfig
lintro check . --tools svelte-check --tool-options "svelte-check:tsconfig=./tsconfig.app.json"

# Auto-install dependencies before checking
lintro check src/ --tools svelte-check --auto-install

Vue-tsc Configuration

Vue-tsc is the TypeScript type checker for Vue Single File Components (SFCs). It extends tsc with Vue-specific type checking capabilities for .vue files.

Installation:

# bun (recommended)
bun add -D vue-tsc

# npm
npm install -D vue-tsc

Native Config: tsconfig.json or tsconfig.app.json

Vue-tsc uses your project’s tsconfig.json for configuration. No additional configuration is needed for Lintro.

Available Options via --tool-options:

OptionTypeDescription
projectstringPath to tsconfig.json file
strictbooleanEnable strict type checking mode
skip_lib_checkbooleanSkip checking declaration files (default: true)
use_project_filesbooleanUse tsconfig’s include patterns (default: false)
timeoutintegerExecution timeout in seconds (default: 120)

Usage Examples:

# Check Vue project
lintro check src/ --tools vue-tsc

# Check with specific tsconfig
lintro check . --tools vue-tsc --tool-options "vue-tsc:project=tsconfig.app.json"

# Enable strict mode
lintro check src/ --tools vue-tsc --tool-options "vue-tsc:strict=true"

# Auto-install dependencies before checking
lintro check src/ --tools vue-tsc --auto-install

html-validate Configuration

html-validate is an offline HTML validator that checks documents for standards compliance, best practices, and accessibility (WCAG) issues. It is check-only — the tool ships no autofixer. By default it inspects *.html, *.htm, *.vue, and *.svelte files.

Installation:

# bun (recommended)
bun add -D html-validate

# npm
npm install -D html-validate

A project-local devDependency is the supported configuration. It is the first and most reliable branch of Lintro’s executable resolution, it is lockfile-pinned, and it needs no registry access at check time. A global install (-g) does not populate node_modules/.bin, so it lands on a later, weaker branch.

html-validate uses the shared Node.js chain — as of a release after v0.115.0 (#1811) so does every other Node.js tool; see Node.js Tool Resolution.

Executable resolution order:

  1. node_modules/.bin/html-validate, searched upward from the directory being checked until the nearest package.json or .git.
  2. the PATH-resolved absolute path of html-validate (e.g. a global install).
  3. bunx html-validate@<pinned> — registry fallback, only if bunx is available.
  4. npx --yes --package html-validate@<pinned> html-validate — registry fallback, only if npx is available.
  5. bare html-validate (fails if nothing is installed).

<pinned> is the version Lintro pins in its manifest; @latest is never resolved at runtime. Branches 3 and 4 emit a one-time warning because they require network access to the npm registry, and a failure on either path is reported with install guidance rather than html-validate’s raw error.

Node runtime requirement: the pinned html-validate (currently 11.18.0) declares engines: { "node": "^22.22.0 || >= 24.8.0" }. Any consumer that installs it, or that reaches the bunx/npx fallback, needs a Node runtime satisfying that range — Node 20, 21, and 22.0–22.21 are not supported. Size your CI matrix accordingly.

Native Config: .htmlvalidate.json, .htmlvalidate.js, .htmlvalidate.cjs, or .htmlvalidate.mjs

html-validate reads its rule configuration from the project’s native config file when present. No additional configuration is required for Lintro.

.htmlvalidateignore is honored by the underlying tool. When it excludes every file Lintro passed, html-validate exits 1 with No files matching patterns; Lintro reports that run as “no files”, passing without claiming any file was inspected. Any other error from html-validate still fails the run.

html-validate treats every path it is given as a glob, so a path holding a glob shape can fail to match itself, or match a different file ([slug].html matches s.html). The shapes are * or ? anywhere, an extglob such as +(a), @(a) or !(a), a character class ([ with a later ], as in a routed site’s [slug].html), brace expansion ({ and a later } with a , or .. between them, even across a newline), any control character such as a newline or tab, and, on POSIX systems, a backslash (read as a path separator). A bare parenthesis is literal, so SvelteKit route groups such as src/routes/(app)/+page.svelte and names such as page (1).html are validated as usual. Lintro never passes a path with one of these shapes to html-validate as an argument. It validates each such file through html-validate’s standard input instead (--stdin), one html-validate process per file, run from the file’s own directory so the same .htmlvalidate.* configuration applies. The file’s name is not passed at all, not even as --stdin-filename: the npx fallback runs html-validate through a shell that would expand [slug].html to a neighbouring s.html. html-validate reports the content as /dev/stdin, and Lintro puts the file’s real path on that report. Findings are reported under the file’s real path and merged with the other files into one result. The glob shapes are handled this way on every platform. The backslash is handled this way on POSIX only: on Windows it is always a path separator, so those paths are passed as usual.

Starting Node once per file is slow, so when html-validate resolves to a project-local or PATH binary Lintro validates all of these files in one Node process instead. A short script loads html-validate’s own API from the package that binary runs and validates each file under its real path. File names reach the script on its standard input, never on a command line. Lintro uses the script only when it can prove it loads the same code the binary would run. The binary must be the package’s unmodified html-validate entry, started with node from PATH, every PATH entry must be absolute, and the script must report the package’s own version. Otherwise, and always under the bunx/npx fallback, each file gets its own --stdin process, with up to min(CPU count, 8, execution.max_workers) at once. Both routes give the same findings and output, and validate the same files: the allowlist below applies to both. A file the script gives no verdict for, because it crashed or threw, is validated again through --stdin. If one file takes longer than the timeout, its findings are lost and the rest are not started, just as when a --stdin call times out.

Standard input does not behave exactly like a path argument: flat configs and transforms are matched against the name /dev/stdin, .htmlvalidateignore is skipped, and the working directory resolves symlinks. Lintro therefore uses standard input only for files a strict allowlist proves safe. A glob-named file goes through standard input only if all of these hold; otherwise it is held back, and the reason names the rule that failed:

  • No flat config (flat config present). No html-validate.config.mjs, .cjs, .js, .mts, .cts or .ts exists in the file’s directory, the run’s working directory, or any parent of either.
  • No symlinks (symlinked path). Neither the file, its directory, nor the working directory has a symlink anywhere in its path.
  • JSON configs on the allowlist (config not on the allowlist). Every .htmlvalidate.* config from the file’s directory up to the filesystem root is .htmlvalidate.json. Each uses only the keys $schema, root, extends and rules. Each extends entry is one of html-validate’s built-in presets: html-validate:a11y, :browser, :document, :prettier, :recommended or :standard. Any transform, plugin or custom elements metadata is therefore held back, including a Vue-only transform for glob-named .html files.
  • Ignore files provably inapplicable (ignore file not provably inapplicable). Every .htmlvalidateignore from the file’s directory up to the filesystem root must be ASCII, as must the file’s path. None of its patterns may match, compared case-insensitively with negation (!) lines disregarded. An ignore file that cannot be read or parsed holds the file back.
  • The pinned html-validate runs from the file’s directory (pinned html-validate cannot be verified from <dir>). Each standard-input call runs from the file’s own directory. When html-validate resolves to the npx fallback, which runs whatever node_modules/.bin/html-validate it finds above its working directory, the same pin check the version gate applies is repeated for that directory. A node_modules tree there, for example, holds the file back. A project-local or PATH install is an absolute path and bunx runs the pinned version, so neither is checked again.

A file that cannot be read is held back as well. A held-back file is treated as it was before standard input was used: it is not validated. Lintro validates the other files, keeps their findings, and fails the run as an execution error that names each file left uninspected and why; if every path is held back, html-validate is not run at all. Rules see these files’ filename as /dev/stdin; only the report carries the real path.

The standard-input calls run side by side, at most min(CPU count, 8, execution.max_workers) at a time, so max_workers: 1 runs them one after another. The first call runs alone, so a hanging html-validate costs one deadline, not one per worker. Under the npx fallback the calls keep running one at a time until one of them has run html-validate and printed a report, because concurrent npx runs that all install a package that is not cached yet can fail without a report. Every file and directory is checked against the allowlist above before the first call starts, and findings are merged in the order the files were listed, so the result is the same as running the calls one after another. If an html-validate call times out, no further call starts, even one already handed to a worker: calls already running finish and keep their findings, and every glob-named file that was not started is named as not inspected.

Available Options via --tool-options:

OptionTypeDescription
timeoutintegerExecution timeout in seconds (default: 120)

Usage Examples:

# Check HTML files
lintro check src/ --tools html-validate

# Check the whole project
lintro check . --tools html-validate

# Auto-install dependencies before checking
lintro check src/ --tools html-validate --auto-install

SQL Tools

SQLFluff Configuration

File: .sqlfluff

[sqlfluff]
dialect = ansi
templater = jinja
exclude_rules = L016,L031

[sqlfluff:indentation]
indent_unit = space
tab_space_size = 4

[sqlfluff:layout:type:comma]
line_position = trailing

[sqlfluff:rules:capitalisation.keywords]
capitalisation_policy = upper

[sqlfluff:rules:capitalisation.identifiers]
extended_capitalisation_policy = lower

File: pyproject.toml

[tool.sqlfluff.core]
dialect = "ansi"
templater = "jinja"
exclude_rules = ["L016", "L031"]

[tool.sqlfluff.indentation]
indent_unit = "space"
tab_space_size = 4

[tool.sqlfluff.rules.capitalisation.keywords]
capitalisation_policy = "upper"

[tool.sqlfluff.rules.capitalisation.identifiers]
extended_capitalisation_policy = "lower"

Available Options:

OptionTypeDescription
dialectstringSQL dialect (ansi, bigquery, postgres, mysql, etc.)
exclude_ruleslistList of rules to exclude from checking
ruleslistList of specific rules to include
templaterstringTemplater to use (raw, jinja, python, placeholder)

.sqlfluffignore is honored by the underlying tool. SQLFluff prints a record for every file it lints, even a clean or empty one. It prints an empty report, with a warning, for a file it skips: one .sqlfluffignore excludes, or one larger than large_file_skip_byte_limit (20,000 bytes by default). When SQLFluff skips every file Lintro passed, check and format runs are reported as “no files”: they pass without claiming any file was inspected, and the reason quotes SQLFluff’s first skip warning. When only some files are skipped, the run is an ordinary one.

Supported Dialects:

  • ansi - ANSI SQL standard
  • bigquery - Google BigQuery
  • clickhouse - ClickHouse
  • databricks - Databricks SQL
  • db2 - IBM Db2
  • exasol - Exasol
  • hive - Apache Hive
  • mysql - MySQL
  • oracle - Oracle Database
  • postgres - PostgreSQL
  • redshift - Amazon Redshift
  • snowflake - Snowflake
  • soql - Salesforce SOQL
  • sparksql - Apache Spark SQL
  • sqlite - SQLite
  • teradata - Teradata
  • tsql - T-SQL (Microsoft SQL Server)

Usage Examples:

# Basic SQL check
lintro check --tools sqlfluff

# Format SQL files
lintro format --tools sqlfluff

# Check with specific dialect
lintro check --tools sqlfluff --tool-options sqlfluff:dialect=postgres

# Exclude specific rules
lintro check --tools sqlfluff --tool-options sqlfluff:exclude_rules=L010,L014

# Use jinja templater
lintro check --tools sqlfluff --tool-options sqlfluff:templater=jinja

YAML Tools

Yamllint Configuration

File: .yamllint

extends: default

rules:
  # Line length
  line-length:
    max: 120
    level: warning

  # Indentation
  indentation:
    spaces: 2
    indent-sequences: true
    check-multi-line-strings: false

  # Comments
  comments:
    min-spaces-from-content: 2

  # Document start
  document-start:
    present: false

  # Truthy values
  truthy:
    allowed-values: ['true', 'false']
    check-keys: true

File: pyproject.toml

[tool.yamllint]
extends = "default"

[tool.yamllint.rules.line-length]
max = 120

[tool.yamllint.rules.indentation]
spaces = 2

Markdown Tools

Markdownlint-cli2 Configuration {#markdownlint-cli2-configuration}

Markdownlint-cli2 supports configuration via JSON, JSONC, YAML, or TOML files. Lintro defers to markdownlint-cli2’s native configuration discovery, which searches upward from the file being checked.

File: .markdownlint.json

{
  "default": true,
  "MD013": {
    "line_length": 120
  },
  "MD041": false
}

File: .markdownlint.yaml

default: true
MD013:
  line_length: 120
MD041: false

File: .markdownlint-cli2.jsonc

{
  "config": {
    "default": true,
    "MD013": { "line_length": 120 },
  },
}

Available Options:

  • Configuration files are discovered automatically by markdownlint-cli2
  • Rules can be enabled/disabled via configuration files
  • Lintro respects markdownlint-cli2’s native configuration discovery
  • Future versions may expose additional options via [tool.lintro.markdownlint-cli2] in pyproject.toml

Prose / Documentation Tools

Vale Configuration {#vale-configuration}

Vale is a syntax-aware prose linter. Lintro defers to Vale’s native configuration discovery, which walks upward from each linted file to find a .vale.ini.

Vale requires a configuration to run. When none is resolvable, Lintro skips vale as a non-error (rather than surfacing vale’s E100 runtime error), keeping mixed-language runs clean.

Native config detection: .vale.ini, _vale.ini, vale.ini.

File: .vale.ini

MinAlertLevel = suggestion

[*.md]
BasedOnStyles = Vale

Installation:

brew install vale
# or download from https://github.com/errata-ai/vale/releases

Available --tool-options:

OptionTypeDescription
configstringPath to a Vale config file (maps to --config)
min_alert_levelstringMinimum alert level: suggestion, warning, or error
timeoutintPer-run timeout in seconds (default 30)

Usage:

lintro check docs/ --tools vale
lintro check docs/ --tools vale --tool-options vale:min_alert_level=warning
lintro check docs/ --tools vale --tool-options vale:config=.vale.ini

Typos Configuration

typos is a fast, low-false-positive spell checker for source code and documentation. It checks all text files and can auto-correct misspellings.

When typos runs. typos is language-agnostic, so it has no entry in the manifest’s language_map. That makes selection depend on which path a project takes:

  • No Lintro config (first run). Tool selection comes from language detection, which does not pull typos in on its own. It joins through the “unmapped tool with a native config” path — i.e. as soon as a typos.toml, .typos.toml or _typos.toml exists at a scan root. crate-ci/typos also reads [tool.typos] in pyproject.toml and [package.metadata.typos] / [workspace.metadata.typos] in Cargo.toml; those files are not in Lintro’s native_configs, so a typical Python or Rust tree does not auto-select the plugin. The binary still honors those tables once typos is selected. An empty [tool.lintro] table is not a config, so this path still applies.
  • With a resolved Lintro config, or --tools all. Language scoping is bypassed. A resolved config is .lintro-config.yaml (or .yml), a non-empty [tool.lintro] table in pyproject.toml, or an in-memory tools: section. Typos then runs when the binary is on PATH and it is not filtered out by execution.enabled_tools or tools.typos.enabled: false. lintro init’s recommended profile writes a language-based enabled_tools allowlist that does not include typos, so those projects do not start spell-checking on upgrade. An existing unscoped lintro check (enabled_tools omitted) will.

lintro check --tools typos selects it explicitly in either case.

Two things are worth knowing before that first run:

  • Turning it off. Do not create a Lintro config solely to disable typos on a no-config first run: that file is a resolved config, so language scoping is skipped and omitting enabled_tools runs the full unscoped registry, including typos. On a first run, omit typos.toml / .typos.toml / _typos.toml instead. On a project that already has a Lintro config, disable the tool:

    tools:
      typos:
        enabled: false

    Or leave it out of execution.enabled_tools if you use an allowlist (lintro init --profile recommended already does).

    --tools is an allowlist rather than an opt-out: lintro check --tools ruff runs ruff only, dropping every other tool as well, so reach for it to narrow a single run, not to exclude one tool.

  • Project vocabulary. The first run usually reports a handful of deliberate spellings — product names, abbreviations, deliberate misspellings inside test fixtures. Add them to .typos.toml rather than suppressing the tool: real words go in [default.extend-words], and anything that is only correct in one context is better handled by a context-anchored [default] extend-ignore-re pattern so the same word is still caught elsewhere. lintro format --tools typos applies the corrections typos is confident about, which clears most of the rest.

File: typos.toml, .typos.toml, or _typos.toml

# Accept project-specific vocabulary that the default dictionary flags
[default.extend-words]
unparseable = "unparseable"

# Skip files/directories that deliberately contain non-English or fixture text
[files]
extend-exclude = ["tests/fixtures/"]

Available Options:

OptionTypeDescription
timeoutintegerPer-invocation timeout in seconds (default: 30)

typos’ word list and file scope are configured through its native typos.toml file rather than --tool-options. Lintro runs typos with --force-exclude so that [files] extend-exclude still applies to the explicit file list Lintro passes. Lintro also pre-filters the file list with a NUL-byte sniff over each file’s first 8 KiB, which keeps lintro format away from the common binary formats (images, archives, compiled objects). That heuristic is not exhaustive — a binary format with no NUL byte in its header can still reach --write-changes — so add the extensions you care about to [files] extend-exclude when a project stores unusual binary assets.

Usage Examples:

# Check spelling across the project
lintro check --tools typos

# Auto-correct misspellings in place
lintro format --tools typos

Rust Tools

Clippy Configuration

Clippy is Rust’s official linter and is configured through Cargo.toml or a separate clippy.toml file. Lintro automatically discovers and runs clippy on Rust projects by finding Cargo.toml files.

File: Cargo.toml

[package]
name = "my-rust-project"
version = "0.1.0"

[lints.clippy]
# Enable all lints
pedantic = "warn"
# Or be more restrictive
# pedantic = { level = "warn", priority = -1 }

# Disable specific lints
too_many_arguments = "allow"
type_complexity = "allow"

# Configure lint levels
needless_return = "warn"
unused_variables = "error"

File: clippy.toml (alternative)

# Clippy-specific configuration
too-many-arguments-threshold = 10
type-complexity-threshold = 100
cognitive-complexity-threshold = 15

# Disable specific lints
disallowed-names = []

Available Options:

  • pedantic: Enable all lints that are typically only enabled in CI
  • nursery: Enable newer, more experimental lints
  • restriction: Enable very strict lints that may be overly restrictive for some projects
  • cargo: Enable lints that check Cargo.toml files

Lintro usage:

# Check Rust code with Clippy
lintro check --tools clippy

# Auto-fix Clippy issues where possible
lintro format --tools clippy

# Check specific Rust directories
lintro check src/ --tools clippy

golangci-lint Configuration

golangci-lint is the de-facto Go meta-linter, running 100+ sub-linters in parallel. Lintro targets golangci-lint v2 and automatically discovers Go modules by finding go.mod files; non-Go projects are skipped. It requires the Go toolchain to be installed. Linter selection and rule tuning are configured through the project’s native config file.

Installation:

brew install golangci-lint
# or see https://golangci-lint.run/welcome/install/

File: .golangci.yml (also .golangci.yaml, .golangci.toml, .golangci.json)

version: '2'
linters:
  enable:
    - errcheck
    - staticcheck
    - ineffassign
    - govet

Available Options:

OptionTypeDescription
timeoutintegerExecution timeout in seconds (120)

Linter enable/disable and per-linter settings live in the native .golangci.* config file rather than as lintro --tool-options.

Lintro usage:

# Check Go code with golangci-lint
lintro check --tools golangci_lint

# Auto-fix issues where the underlying linters support it
lintro format --tools golangci_lint

# Increase the timeout for a large module
lintro check --tools golangci_lint --tool-options golangci_lint:timeout=300

Cargo-audit Configuration

Cargo-audit checks each Cargo.lock against the RustSec advisory database. It reads .cargo/audit.toml from the directory of the lockfile it audits.

Which lockfiles are audited (#3549): every Cargo.lock that lintro’s file discovery finds under the paths you pass, with one cargo-audit run per lockfile, except copies: by default a Cargo.lock below a directory named vendor or target is not audited and is named in the output instead (Not audited, lockfiles under a vendor/ or target/ directory (N): ...).

Why: cargo resolves a build from the lockfile at the top of your project or workspace. The Cargo Book’s workspace reference says “All packages share a common Cargo.lock file which resides in the workspace root”, and its FAQ says “Cargo.lock does not affect the consumers of your package, only Cargo.toml does that”. A vendored crate’s own Cargo.lock, or the one inside a packaged crate under target/package/, records that crate’s own resolution, not the versions your project builds, which the top-level lockfile already lists.

How the rule reads a path:

  • Only directories below the path you asked lintro to scan count. A repository that itself lives inside a folder named vendor or target is audited normally.
  • The whole directory name must match: app/vendor/dep/Cargo.lock and target/package/x/Cargo.lock are skipped; vendored/Cargo.lock and my-target/Cargo.lock are audited.
  • A lockfile you name is audited: lintro check vendor/dep/Cargo.lock audits it.
  • Passing the directory itself makes it the root: lintro check vendor/ audits vendor/dep/Cargo.lock, but still skips a nested copy such as vendor/dep/vendor/x/Cargo.lock, because vendor appears again below that root.
  • With several paths, a lockfile is skipped only if it is a copy below every path that holds it: lintro check . vendor audits vendor/dep/Cargo.lock.
  • lintro watch passes the changed files themselves, so a changed vendored lockfile is named and audited. --diff keeps the paths you passed as roots, so a changed vendored lockfile is skipped and named. --incremental does not apply to cargo-audit, so there every vendored lockfile below the paths you passed is skipped and named on each run.
  • A crate of your own in a directory named vendor or target below the scanned path is skipped like a copy. For example, with vendor/mytool/Cargo.lock, run lintro check vendor/mytool (or name the lockfile), or set include_vendored.

To audit the copies too, set the include_vendored option:

[tool.lintro.cargo_audit]
include_vendored = true

or on the command line, --tool-options cargo_audit:include_vendored=True.

The exclusions shared by every tool also apply:

  • the built-in defaults (DEFAULT_EXCLUDE_PATTERNS in lintro/utils/path_filtering.py): .git, .hg, .svn, dist, build, htmlcov, .terraform, *.egg-info, cache directories such as .cache/ and .terragrunt-cache/, and lintro’s own run directories;
  • virtual-environment directories (venv, .venv, env, site-packages, node_modules and similar), unless --include-venv is set.

Discovery does not read .gitignore. To leave other lockfiles out, use .lintro-ignore, --exclude, or exclude_patterns in [tool.lintro.cargo_audit]; a top-level [tool.lintro] exclude key is not read.

Each finding names its own lockfile. A lockfile reached through a symlink is reported under the symlink’s path, and the output says when the link points outside the project. Lockfiles that an exclude pattern removed are named in the output (Not audited, excluded by lintro's exclude patterns (N): ...), separately from the skipped copies. If every lockfile in scope was excluded or skipped as a copy, cargo-audit reports “no files matched”, as any tool does whose inputs are all left out, and its output names them (No Cargo.lock in scope to audit. followed by those notes). In a --diff run the scope is the changed lockfiles; a --diff run in which no lockfile changed reports “no files matched” without the lists, and the same scope applies to excluded, skipped and unreadable entries: only those in the diff are named.

cargo_audit ignores lintro’s incremental cache (its definition sets incremental_cacheable=False, see Incremental Checks). Its verdict depends on the advisory database and on the deny settings as much as on the lockfile, so an unchanged lockfile can change verdict when a new advisory is published. With --incremental, cargo_audit therefore audits every Cargo.lock in scope, exactly as a full run does, and says so in its output; --diff still narrows the scope to the changed lockfiles. lintro’s changed set holds only paths that resolve to a file, so in a --diff run an unreadable entry is caught when it is a changed Cargo.lock that cannot be read, but a dangling symlink, symlink loop or directory named Cargo.lock is only caught by a full run. Lists of lockfiles name the first ten and give a count of the rest.

Fail closed. A lockfile that was not audited fails the check and is named, whatever the other lockfiles found. Findings from a failed audit are still shown. A lockfile counts as not audited when:

  • cargo-audit printed no usable JSON report;
  • a vulnerability record in the report could not be read or lacks the advisory id, package name or package version, or the report’s found and count disagree with the records it lists (findings that could be read are still shown);
  • the exit status does not match the report: cargo-audit exits 0 when clean, 1 when it found vulnerabilities or denied a warning, and 2 on an error, so exit 2 is a failure even with findings;
  • the lockfile lists no packages (for example a zero-byte file). Cargo always records the root package, even for a crate without dependencies, so such a file is not a lockfile cargo wrote;
  • the entry named Cargo.lock is not a readable file: a directory, a dangling symlink or a symlink loop.

A failed audit leaves file inspection unknown, so it never updates a baseline.

Denied warnings. When .cargo/audit.toml ([output] deny = [...]) or -D warnings denies a warning such as an unmaintained crate, cargo-audit exits 1 without vulnerabilities. That lockfile was audited, so it is not reported as missing a report: the check fails with cargo-audit denied warnings, audited but failing (N): <lockfile> (<kind> <crate> (<advisory>)), and file inspection stays known.

Available Options via --tool-options:

OptionTypeDescription
timeoutintegerOne budget in seconds for every lockfile in the check (default 120)
include_vendoredbooleanAlso audit lockfiles below vendor/ and target/ (default false)

cargo-audit may fetch the advisory database until one lockfile has produced a report; after that, lockfiles run with --no-fetch. When the budget runs out, the result is timed out and names the lockfiles that were not audited.

Cargo-deny Configuration

Cargo-deny checks Rust dependencies for license compliance, security advisories, banned crates, and duplicate dependencies. It uses deny.toml for configuration and runs via cargo deny check.

Installation:

# cargo install
cargo install cargo-deny

# Or via cargo-binstall for faster installation
cargo binstall cargo-deny

File: deny.toml

[advisories]
db-path = "~/.cargo/advisory-db"
db-urls = ["https://github.com/rustsec/advisory-db"]

[licenses]
allow = ["MIT", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause", "ISC"]

[bans]
multiple-versions = "warn"
wildcards = "allow"

[sources]
unknown-registry = "warn"
unknown-git = "warn"

Available Options via --tool-options:

OptionTypeDescription
timeoutintegerExecution timeout in seconds (default: 60)

Lintro usage:

# Check Rust project with cargo-deny
lintro check --tools cargo_deny

# Check specific Rust directory
lintro check my-crate/ --tools cargo_deny

# Set a longer timeout for large workspaces
lintro check . --tools cargo_deny --tool-options "cargo_deny:timeout=120"

Shell Tools

ShellCheck Configuration

ShellCheck is a static analysis tool for shell scripts. It identifies bugs, syntax issues, and suggests improvements for bash/sh/dash/ksh/zsh scripts. Unlike formatters, ShellCheck focuses on finding potential bugs and problematic patterns.

Installation:

# macOS
brew install shellcheck

# Debian/Ubuntu
apt-get install shellcheck

# Fedora
dnf install ShellCheck

File: .shellcheckrc

# Exclude specific codes
disable=SC2086,SC2046

# Set default shell dialect
shell=bash

# Set minimum severity level
severity=warning

Lintro options via --tool-options:

# Set minimum severity level (error, warning, info, style)
lintro check --tools shellcheck --tool-options "shellcheck:severity=warning"

# Force shell dialect (bash, sh, dash, ksh, zsh)
lintro check --tools shellcheck --tool-options "shellcheck:shell=bash"

# Exclude specific codes
lintro check --tools shellcheck --tool-options "shellcheck:exclude=SC2086|SC2046"

# Follow repo-local sourced files (resolves SC1091 for SCRIPT_DIR sourcing)
lintro check --tools shellcheck \
  --tool-options "shellcheck:external_sources=True,shellcheck:source_paths=SCRIPTDIR"

Available Options:

OptionTypeDescription
severitystrMinimum severity: error, warning, info, style
excludelist[str]List of codes to exclude (e.g., SC2086, SC2046)
shellstrForce shell dialect: bash, sh, dash, ksh, zsh
external_sourcesboolFollow sourced files external to the script (-x). Default False
source_pathslist[str]Search paths for sourced files (--source-path=...); supports the SCRIPTDIR token. Setting this implies external_sources (-x is enabled automatically)

Source-following (SC1091):

Scripts that source repo-local helpers with the runtime-safe pattern below emit SC1091 (“Not following …”) by default, because ShellCheck cannot statically resolve the dynamic path:

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../lib/common.sh"

Opt in to source-following (off by default, so existing projects are unaffected) by pointing source_paths at the directories ShellCheck should search. ShellCheck’s literal SCRIPTDIR token resolves relative to each script’s own directory, which matches the pattern above without hard-coding repo paths. Because ShellCheck ignores --source-path unless -x is active, setting source_paths automatically enables external_sources, so you do not need to set both — configuring paths is enough. (You may still set external_sources = true on its own to follow sources found on the default search path.)

pyproject.toml:

[tool.lintro.shellcheck]
# source_paths implies external_sources; -x is added automatically.
source_paths = ["SCRIPTDIR", "scripts/lib"]

With this enabled, the SC1091 above is resolved without per-line # shellcheck disable=SC1091 or # shellcheck source=... suppressions.

Common ShellCheck Codes:

CodeDescription
SC2086Double quote to prevent globbing and word splitting
SC2046Quote this to prevent word splitting
SC2002Useless use of cat
SC2006Use $(…) notation instead of backticks
SC2034Variable appears unused
SC2155Declare and assign separately

Inline ignoring:

#!/bin/bash

# shellcheck disable=SC2086
echo $unquoted_variable

# Or use a directive that applies to the whole file at the top:
# shellcheck disable=SC2086,SC2046

Lintro usage:

# Check shell scripts with ShellCheck
lintro check --tools shellcheck

# Check with warning level (ignores info and style)
lintro check --tools shellcheck --tool-options "shellcheck:severity=warning"

# Check specific shell directories
lintro check scripts/ --tools shellcheck

Shfmt Configuration

Shfmt is a shell script formatter that supports POSIX, Bash, mksh, and bats shells. It formats shell scripts to ensure consistent style and can detect formatting issues in diff mode.

Installation:

# macOS
brew install shfmt

# Linux (via Go)
go install mvdan.cc/sh/v3/cmd/shfmt@latest

# Via npm/bun
bun add -g shfmt

File: .editorconfig (shfmt respects EditorConfig)

[*.sh]
indent_style = tab
indent_size = 4
shell_variant = bash
binary_next_line = true
switch_case_indent = true
space_redirects = false

Lintro options via --tool-options:

# Set indentation to 4 spaces (0 for tabs)
lintro check --tools shfmt --tool-options "shfmt:indent=4"

# Enable binary operators at start of line
lintro check --tools shfmt --tool-options "shfmt:binary_next_line=True"

# Indent switch cases
lintro check --tools shfmt --tool-options "shfmt:switch_case_indent=True"

# Add space after redirect operators
lintro check --tools shfmt --tool-options "shfmt:space_redirects=True"

# Set language dialect (bash, posix, mksh, bats)
lintro check --tools shfmt --tool-options "shfmt:language_dialect=bash"

# Enable code simplification
lintro check --tools shfmt --tool-options "shfmt:simplify=True"

Available Options:

OptionTypeDescription
indentintIndentation size. 0 for tabs, >0 for spaces
binary_next_lineboolBinary ops like && and | may start a line
switch_case_indentboolIndent switch cases
space_redirectsboolRedirect operators followed by space
language_dialectstrShell dialect: bash, posix, mksh, bats
simplifyboolSimplify code where possible

Lintro usage:

# Check shell scripts with shfmt
lintro check --tools shfmt

# Auto-format shell scripts
lintro format --tools shfmt

# Check specific shell directories
lintro check scripts/ --tools shfmt

Dotenv Tools

dotenv-linter Configuration

dotenv-linter is a fast, Rust-based linter and fixer for .env files. It detects duplicate keys, lowercase keys, incorrect delimiters, unordered keys, and stray whitespace, and can auto-fix most of them.

Installation:

# macOS
brew install dotenv-linter

# Cargo
cargo install dotenv-linter

# Binary releases
# https://github.com/dotenv-linter/dotenv-linter/releases

Native config: dotenv-linter has no config file; behavior is controlled entirely via CLI flags (surfaced through --tool-options).

Lintro options via --tool-options:

# Recursively scan directories for .env files
lintro check --tools dotenv_linter --tool-options "dotenv_linter:recursive=True"

# Skip specific checks (maps to --ignore-checks)
lintro check --tools dotenv_linter \
  --tool-options "dotenv_linter:skip_checks=LowercaseKey|UnorderedKey"

# Exclude paths from linting
lintro check --tools dotenv_linter --tool-options "dotenv_linter:exclude=vendor"

# Validate against a schema file
lintro check --tools dotenv_linter --tool-options "dotenv_linter:schema=env.schema.json"

# Auto-fix issues in place (no .env.bak backups are created)
lintro format --tools dotenv_linter

Available Options:

OptionTypeDescription
recursiveboolRecursively scan directories for .env files. Default False
excludelist[str]File or directory paths to exclude
skip_checkslist[str]Check names to bypass (maps to --ignore-checks)
schemastrPath to a schema file to validate .env contents

Note: real .env files are frequently .gitignored, so they may not be discovered during a normal repository scan. Point Lintro at the file explicitly, or commit a template such as .env.example for the linter to check.

TOML Tools

Taplo Configuration

File: taplo.toml or .taplo.toml

# Taplo configuration
[formatting]
align_entries = false
align_comments = true
array_trailing_comma = true
array_auto_expand = true
array_auto_collapse = true
compact_arrays = true
compact_inline_tables = false
column_width = 80
indent_tables = false
indent_entries = false
indent_string = "  "
trailing_newline = true
reorder_keys = false
allowed_blank_lines = 2
crlf = false

[[rule]]
# Apply to all TOML files
include = ["**/*.toml"]
keys = ["Cargo.toml"]

[rule.formatting]
reorder_keys = true

Available Options:

OptionTypeDescription
schemastringPath or URL to JSON schema for validation
aligned_arraysbooleanAlign array entries vertically
aligned_entriesbooleanAlign table entries (key = value)
array_trailing_commabooleanAdd trailing comma in multi-line arrays
indent_stringstringIndentation string (default: 2 spaces)
reorder_keysbooleanReorder keys alphabetically

Usage Examples:

# Basic TOML check
lintro check --tools taplo

# Format TOML files
lintro format --tools taplo

# Check with aligned entries
lintro check --tools taplo --tool-options taplo:aligned_entries=true

# Format with specific indent
lintro format --tools taplo --tool-options taplo:indent_string="    "

# Use custom schema for validation
lintro check --tools taplo --tool-options taplo:schema=pyproject.schema.json

Buf Configuration

File: buf.yaml (or buf.work.yaml for multi-module workspaces)

buf works with or without a buf.yaml. When no config is present, buf lints against its STANDARD default rule set with the current directory as the module root. Add a buf.yaml to select rule categories (MINIMAL, BASIC, STANDARD) or to opt into COMMENTS/UNARY_RPC:

version: v2
lint:
  use:
    - STANDARD
  except:
    - PACKAGE_VERSION_SUFFIX

Available Options:

OptionTypeDescription
configstringPath to a buf.yaml (CLI --tool-options cannot pass inline YAML)
disable_symlinksbooleanDo not follow symlinks when reading sources

Usage Examples:

# Lint Protocol Buffer files (buf lint)
lintro check --tools buf

# Format .proto files in place (buf format --write)
lintro format --tools buf

# Use an explicit buf.yaml (path relative to the project root)
lintro check --tools buf --tool-options buf:config=proto/buf.yaml

Note on module roots: lintro runs buf from your project root — the nearest ancestor of the selected .proto files holding a project marker (.git, pyproject.toml, package.json, …), not their common parent directory. A relative config path is therefore resolved from the project root. buf’s directory-based rules (e.g. PACKAGE_DIRECTORY_MATCH) resolve package paths relative to that same directory, so add a buf.yaml with a modules path when your protos live in a subdirectory and their packages are not laid out relative to the project root.

Infrastructure Tools

Hadolint Configuration

File: .hadolint.yaml

ignored:
  - DL3008 # Pin versions in apt-get install
  - DL3009 # Delete apt-get lists
  - DL3015 # Avoid additional packages

trustedRegistries:
  - docker.io
  - gcr.io

allowedRegistries:
  - docker.io
  - gcr.io
  - quay.io

Inline ignoring:

# hadolint ignore=DL3008
RUN apt-get update && apt-get install -y \
    python3 \
    python3-pip

Checkov Configuration

Checkov scans Terraform sources (*.tf, *.tf.json) for security and compliance misconfigurations. Dockerfiles are intentionally left to hadolint to avoid double-reporting the same file under two rule sets. Lintro never opts checkov into the platform: --skip-download, --download-external-modules False and --skip-results-upload are always passed and there is no --bc-api-key code path, so no lintro option can make checkov fetch policies or modules, or upload a finding. A BC_API_KEY in the environment is the one remaining route to an outbound request — checkov reads that variable itself, so unset it when a run must be fully offline. It buys no enrichment either way: --skip-download suppresses the platform metadata download, so severity and guideline URLs stay unpopulated in every lintro-driven run, keyed or not.

  • Discovery: Terraform files (*.tf, *.tf.json)
  • Native config: .checkov.yaml / .checkov.yml
  • Install: uv tool install checkov (isolated venv), or scripts/utils/install-tools.sh --local --tools checkov. Checkov requires packaging<24 while lintro requires packaging>=25, so it is deliberately not part of lintro[tools] and must never be pip-installed into lintro’s own environment. The pinned version lives in lintro/_tool_versions.py; brew install checkov also works but Homebrew’s formula lags upstream, so it may sit below that pin (the supported floor in manifest.src.json is deliberately lower, so a brew install still runs).

Tool options:

OptionTypeDefaultDescription
checkslist / string-Run only these check IDs (--check)
skip_checkslist / string-Skip these check IDs (--skip-check)
compactbooltrueOmit the offending code block from the report
timeoutint120Per-invocation timeout in seconds

--tool-options splits on commas, so several check IDs are passed pipe-delimited:

# Skip specific policies
lintro check --tools checkov --tool-options "checkov:skip_checks=CKV_AWS_18|CKV_AWS_21"

# Run only specific policies
lintro check --tools checkov --tool-options "checkov:checks=CKV_AWS_260"

Note: Only the terraform and terraform_json frameworks run — lintro pins --framework terraform,terraform_json so checkov’s secrets framework does not double-report what gitleaks and trufflehog own. checks and skip_checks can therefore only select Terraform policies; another framework’s ID (say CKV_SECRET_6) matches nothing and reports a clean scan.

Checkov’s own severity and guideline fields come from platform metadata it downloads, which --skip-download suppresses on every lintro run. Findings therefore normalize to lintro’s default severity and link to the Checkov policy index. The parser still reads both fields so nothing is lost if that ever changes.

Checkov is listed under both terraform and security in the manifest language map, so a no-config run that detects Terraform — or any run that selects the security set with checkov on PATH — will invoke it. That can fail previously green Terraform CI on first upgrade. Disable it with tools.checkov.enabled: false, or skip individual policies with checkov:skip_checks.

Actionlint Configuration

Actionlint validates GitHub Actions workflows. Lintro discovers workflow files under /.github/workflows/ when you run lintro check . and invokes the actionlint binary.

  • Discovery: YAML files filtered to those in /.github/workflows/
  • Defaults: Lintro does not pass special flags; native actionlint defaults are used
  • Local install: use scripts/utils/install-tools.sh --local to place actionlint on PATH
  • Docker/CI: the Docker image installs actionlint during build, so CI tests run it
# Validate workflows only
lintro check --tools actionlint

# Validate workflows along with other tools
lintro check --tools ruff,actionlint

Git Tools

Commitlint Configuration

Commitlint validates git commit messages against the Conventional Commits specification. Unlike file-based tools, it inspects git state: Lintro runs commitlint --last to validate the repository’s most recent commit message.

  • Requires a config; Lintro skips it as a non-error when none is present.
  • Install: bun add -D @commitlint/cli @commitlint/config-conventional or npm install -D @commitlint/cli @commitlint/config-conventional. A project devDependency is preferred; a global or Homebrew install is used when there is no local one. See Node.js Tool Resolution.
  • Cannot auto-fix — amend the commit to satisfy the rules.

File: commitlint.config.js (or .commitlintrc.{js,cjs,json,yaml,yml}, or a commitlint key in package.json)

// commitlint.config.js
module.exports = { extends: ['@commitlint/config-conventional'] };

Available --tool-options:

OptionTypeDefaultDescription
timeoutint30Max seconds to wait for commitlint
# Validate the latest commit message
lintro check --tools commitlint

# Increase the timeout
lintro check --tools commitlint --tool-options "commitlint:timeout=60"

Project-Specific Configuration

Multi-Language Projects

For projects with multiple languages, organize configuration by component:

project/
├── .lintro.toml              # Lintro-specific config
├── pyproject.toml            # Python tools
├── .prettierrc               # JavaScript/CSS
├── .yamllint                 # YAML files
├── .hadolint.yaml           # Docker files
├── frontend/
│   └── .prettierrc          # Frontend-specific overrides
└── backend/
    └── pyproject.toml       # Backend-specific overrides

Lintro Project Configuration

File: .lintro.toml (future feature)

[lintro]
default_tools = ["ruff", "pydoclint", "prettier", "yamllint"]
table_format = true
group_by = "auto"
exclude_patterns = ["migrations", "node_modules", "dist"]

[lintro.timeouts]
default = 30
pydoclint = 45
prettier = 60

[lintro.paths]
python = ["src/", "tests/"]
javascript = ["frontend/", "assets/"]
yaml = [".github/", "config/"]
docker = ["Dockerfile*", "docker/"]

[lintro.output]
format = "table"
save_to_file = true
file_prefix = "lintro-report"

Output System: Auto-Generated Reports

Lintro now generates all output formats for every run in a timestamped directory under .lintro/ (e.g., .lintro/run-20240722-153000/).

You do not need to specify output format or file options. Each run produces:

  • console.log: The full console output
  • results.json: Machine-readable results
  • report.md: Human-readable Markdown report
  • report.html: Web-viewable HTML report
  • summary.csv: Spreadsheet-friendly summary

This ensures you always have every format available for your workflow, CI, or reporting needs.

AI Configuration

Lintro includes optional AI-powered features for actionable summaries and interactive fix suggestions. See the full AI Features Guide for detailed usage.

Quick Setup

# Install AI dependencies (published package)
uv pip install 'lintro[ai]'
# Or from source checkout:
uv sync --extra ai

# Set the API key for your configured provider. `ai.provider` is required once
# `ai.lint` or `ai.review` is enabled; lintro has no default provider.
# Anthropic: ANTHROPIC_API_KEY
# Cursor:    CURSOR_API_KEY
# OpenAI:    OPENAI_API_KEY
# Custom:    set ai.api_key_env in config to use any env var name
export ANTHROPIC_API_KEY=sk-ant-...   # whichever provider you chose
# .lintro-config.yaml
ai:
  enabled: true
  lint: true # AI summaries / --fix on chk/fmt
  review: false # lintro review (opt-in separately)
  provider: anthropic # or cursor / openai — required, no default
  transport: api # or cli — no default; doctor flags it unset

AI CLI Flags

FlagEffect
(none)AI summary only (1 API call)
--fixAdd interactive AI fix suggestions

Config Defaults for Flags

Set default_fix to avoid typing the flag every time. This is a partial overlay showing only the flag defaults — ai.provider is still required whenever ai.lint or ai.review is enabled (and ai.transport has no default; lintro doctor flags it unset), so merge it with the complete example in Quick Setup:

ai:
  enabled: true
  lint: true
  review: true
  default_fix: false # only run --fix when explicitly requested

Full AI Config Reference

SettingTypeDefaultDescription
enabledboolfalseMaster switch; ANDs with lint / review
lintboolfalseEnable AI lint summaries on chk/fmt
reviewboolfalseEnable the lintro review AI diff review
providerstringnoneAI provider (anthropic, cursor, or openai); required when ai.lint or ai.review is enabled
transportstringnoneTransport (api or cli); no default — lintro doctor flags it unset when ai.lint or ai.review is enabled
modelstring(default)Model override
api_key_envstring(default)Custom env var for API key
default_fixboolfalseAlways run --fix in check
auto_applyboolfalseApply fixes without confirmation
auto_apply_safe_fixesbooltrueAuto-apply safe-style fixes in non-interactive
max_tokensint4096Max tokens per request
max_fix_attemptsint20Max issues to attempt fixing per run
max_parallel_callsint5Concurrent AI calls (1-20); honored with a cost cap; n−1 overshoot possible
max_retriesint2Max retries for transient errors (0-10)
rate_limit_max_retriesint6Retries for HTTP 429 only (0-20); waits Retry-After clamped to 300 s
max_cost_usdfloatnullLegacy USD cap; prefer profiles. Overlay uncapped lifts; overlay 0 is an error
api_timeoutfloat60.0Legacy timeout (s); prefer transports.*.timeout
transportsobjectempty profilesPer-transport profiles (api / cli) — see AI review transports
validate_after_groupboolfalseValidate immediately after each accepted group
show_cost_estimatebooltrueShow token/cost info in output
context_linesint15Lines of context sent for fix generation (1-100)
fix_search_radiusint5Line search radius for fix application (1-50)
checkpoint_retentionint10Git checkpoint refs kept (>=0; 0 = current only)
checkpoint_fmtboolfalseGit checkpoint before lintro format mutations
retry_base_delayfloat1.0Initial retry delay in seconds (min 0.1)
retry_max_delayfloat30.0Maximum retry delay in seconds (min 1.0)
retry_backoff_factorfloat2.0Retry delay multiplier (min 1.0)
transcript_loggingboolfalseOpt-in NDJSON logging of AI provider traffic
transcript_retentionint10Max transcript files kept under .lintro-cache

Idiom Review Tool (idiom-review)

The idiom-review tool uses AI to find issues that syntax-matching linters cannot: code that is syntactically correct but non-idiomatic or redundantly duplicated across files. Unlike the AI summary and --fix flows, it is a first-class ToolDefinition plugin. It is classified advisory, so it runs under lintro review — never under lintro check or lintro format, whose findings must stay deterministic (#1308).

Install:

uv pip install 'lintro[ai]'
# Set the variable your chosen provider declares: ANTHROPIC_API_KEY,
# CURSOR_API_KEY or OPENAI_API_KEY.
export ANTHROPIC_API_KEY=sk-ant-...

The tool is disabled by default and is a no-op until explicitly opted in. When no AI provider is available (missing SDK, key, or credits), it degrades gracefully to a skipped result rather than failing the run. Findings are cached by content hash under .lintro-cache/idiom, so unchanged files cost nothing on repeat runs.

Options:

OptionTypeDefaultDescription
enabledboolfalseOpt-in gate — must be true to run
modestringper-fileper-file · duplication · both
min_confidencestringmediumDrop findings below this level (low/medium/high)
max_filesint25Cap on files reviewed per run (cost bound)
languagestringpythonLanguage to review; set explicitly for other languages

Modes:

  • per-file — flags idiomatic misses per file (e.g. verbose loops instead of any()/all() comprehensions).
  • duplication — flags the same utility logic reimplemented across files, invisible to per-file linters, with a suggested extraction point.
  • both — runs both modes in one pass.

Usage example:

# .lintro-config.yaml
ai:
  enabled: true
  provider: anthropic # or cursor / openai — required, no default
  transport: api # or cli — no default; doctor flags it unset
tools:
  idiom-review:
    options:
      enabled: true # opt-in gate (default: false)
      mode: per-file # per-file | duplication | both
      min_confidence: medium
      max_files: 25 # cap files reviewed per run (cost bound)

Or enable ad hoc from the CLI without modifying config:

lintro review --advisory-only --tool-options idiom-review:enabled=true

Advanced Configuration

Tool Overlap

Two tools that touch the same files are not a conflict to be resolved by dropping one. They are ordered by the derived DAG, and where both would format the same pattern the loser is demoted rather than dropped — ruff keeps its fix capability and black owns formatting on *.py. No tool is ever removed from a run, so --ignore-conflicts is inert and kept only for call-site compatibility.

# See the order and the claim behind every constraint
lintro check --explain-order

# List every tool with its position in that order
lintro list-tools

Performance Optimization

Large Codebases

# Use specific tools for faster checks
lintro check --tools ruff

# Process directories separately
lintro check src/ --tools ruff,pydoclint
lintro check tests/ --tools ruff

# Exclude heavy directories
lintro check --exclude "venv,node_modules,migrations"

CI/CD Optimization

# Fast checks for PR validation
lintro check --tools ruff

# Full analysis for main branch
lintro check --tools all --output full-report.txt

Custom Output Formats

JSON Output (planned)

lintro check --output-format json --output results.json
{
  "summary": {
    "total_issues": 15,
    "tools_run": ["ruff", "pydoclint"],
    "files_checked": 42
  },
  "issues": [
    {
      "file": "src/main.py",
      "line": 12,
      "column": 5,
      "tool": "ruff",
      "code": "F401",
      "message": "'os' imported but unused",
      "severity": "error"
    }
  ]
}

Markdown Output (planned)

lintro check --output-format markdown --output QUALITY_REPORT.md

Integration Patterns

Pre-commit Hooks

File: .pre-commit-config.yaml

repos:
  - repo: local
    hooks:
      - id: lintro-check
        name: Lintro Quality Check
        entry: lintro check --output-format grid
        language: system
        pass_filenames: false
        stages: [commit]

      - id: lintro-fix
        name: Lintro Auto-fix
        entry: lintro format --output-format grid
        language: system
        pass_filenames: false
        stages: [commit]

Makefile Integration

.PHONY: lint fix check quality install-tools

# Quality checks
lint:
	lintro check

fix:
	lintro format

check: lint
	@echo "Quality check completed"

# Comprehensive quality report
quality:
	lintro check --tools all --output quality-report.txt
	@echo "Full quality report saved to quality-report.txt"

# Tool installation
install-tools:
	pip install ruff pydoclint
	npm install -D prettier

IDE Integration

VS Code Settings

File: .vscode/settings.json

{
  "python.linting.enabled": false,
  "python.formatting.provider": "none",
  "editor.formatOnSave": false,
  "editor.codeActionsOnSave": {
    "source.organizeImports": false
  },
  "files.associations": {
    ".lintro.toml": "toml"
  }
}

File: .vscode/tasks.json

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "Lintro Check",
      "type": "shell",
      "command": "lintro",
      "args": ["check", "--output-format grid"],
      "group": "test",
      "presentation": {
        "reveal": "always",
        "panel": "new"
      },
      "problemMatcher": []
    },
    {
      "label": "Lintro Fix",
      "type": "shell",
      "command": "lintro",
      "args": ["format", "--output-format grid"],
      "group": "build"
    }
  ]
}

Packaged Semgrep rules

Lintro ships opt-in Semgrep packs, versioned with the Lintro release. List the installed packs with lintro list-tools --rules (also supports --json and --output). Enable the first pack in .lintro-config.yaml:

tools:
  semgrep:
    rule_packs: [python/none-coercion]

The equivalent pyproject setting is:

[tool.lintro.semgrep]
rule_packs = ["python/none-coercion"]

For a CLI override, --tool-options parses pipe-separated values as a list. Keep a trailing pipe when selecting just one pack; a pipe alone creates an empty list and disables inherited packs for that run:

lintro check src --tools semgrep --tool-options 'semgrep:rule_packs=python/none-coercion|'
lintro check src --tools semgrep --tool-options 'semgrep:rule_packs=|'

Quote the value so the shell passes the pipe literally. A bare pack name or [] is parsed as a string and rejected by rule_packs validation. The CLI list replaces the inherited selection; disabling packs leaves Semgrep’s normal config selection in effect.

list-tools --rules lists packs instead of the tool inventory: --json and --output apply to that listing, and --verbose adds no tool details.

Run lintro check src --tools semgrep with Semgrep installed. Each pack adds a local --config path alongside .semgrep.yaml, .semgrep.yml, or .semgrep/ in the scan project root. With packs enabled, the implicit auto registry lookup is replaced by these local rules. An explicit Semgrep config option, including config=auto, is preserved alongside the packs. No packs run by default, and unknown pack names raise a configuration error with the available names. Nonempty rule_packs selections are rejected for tools other than Semgrep.

python/none-coercion asks whether missing values mean empty or unknown. Its eight INFO rule families cover literal-attribute getattr defaults, falsey or fallbacks, concrete exception returns, empty returns after None guards, stringified mapping reads, defaults on values decoded with json.loads, failed ToolResult constructors, and empty returns when a capability is unavailable. Findings are review candidates, not proven defects. The fixtures document suppressions for known subprocess stdout fallbacks, environment reads, ALL_CAPS tables, false-returning is_*/has_* predicates, and true-returning None guards. Other objects with a stdout attribute remain visible.

Enabling the pack uses the existing Semgrep finding and CLI exit behavior: INFO candidates can make lintro check exit nonzero. There is no automatic advisory lane, precise ToolResult gate, or candidate-count ratchet yet. The prerequisite work in issues #438 and #3018 must land before precise-rule gating. See ADR-0012 for boundaries and the future native deterministic AST tool decision.

Direct formatter invocations in scripts

Enable scripts/no-direct-formatter to review scripts that bypass Lintro’s formatting configuration (#1610):

tools:
  semgrep:
    rule_packs: [scripts/no-direct-formatter]

Or use rule_packs = ["scripts/no-direct-formatter"] in [tool.lintro.semgrep]. Run lintro check . --tools semgrep. This pack is off by default, including in Lintro’s own configuration. Findings have WARNING severity and use Semgrep’s existing check exit behavior; there is no automatic fix.

The pack targets **/scripts/**, **/*.mjs, and **/Makefile, at the project root or in nested packages. It covers extensionless files inside scripts too. Other Makefile names (GNUmakefile, makefile, and *.mk) are outside the shipped scope unless they are inside scripts. A file such as src/ordinary.js, docs/formatters.md, descripts/generate.sh, or a root format.sh is outside that scope. Files passed explicitly on the command line are filtered the same way. Selecting this pack expands Lintro’s candidate discovery to every file so Semgrep can apply these path filters. That wider file list goes to the whole Semgrep run, not only to this pack: a native .semgrep.yaml, an explicit config, or config=auto running alongside it also scans files outside Semgrep’s usual extensions, such as YAML, Dockerfiles and extensionless scripts. Use narrower CLI paths or Semgrep’s existing include/exclude options to restrict the scan further, for example:

lintro check scripts --tools semgrep --tool-options 'semgrep:include=scripts/**'

The directory globs are matched against paths relative to the project root: the nearest directory at or above the scanned files that holds .git, pyproject.toml, package.json, setup.py, setup.cfg, go.mod, or Cargo.toml. In a tree with no such marker, Semgrep runs from the files’ common directory instead, the same directory your own .semgrep.yaml, a relative config, and rooted paths filters resolve against. Scanning only scripts/ then hands Semgrep fmt.sh rather than scripts/fmt.sh, so **/scripts/** cannot match. Lintro does not move Semgrep to compensate. It fails the Semgrep result as incomplete instead: status: "failed" in JSON, with a message naming the pack and the files it did not check. Findings from other rules are still reported. This also covers a nested scripts/sub/, and starting inside scripts/ to scan a subdirectory. A scripts directory counts when it is the directory you started lintro check in or lies between it and the scanned path; one above that directory does not. Add a project marker to scan these trees with the pack.

These filters narrow the shipped scope; they cannot widen it. For a different scope, use lintro/rules/scripts/no-direct-formatter.yaml as a starting point for a native Semgrep configuration and run it with semgrep scan --config your-rules.yaml.

The literal command matcher recognizes:

  • black, oxfmt, rustfmt, and shfmt invocations;
  • prettier with --write or -w;
  • ruff format, buf format, cargo fmt, taplo fmt/format, and sqlfluff format/fix;
  • bare shell commands, Make recipes, simple &&/||/; command chains, adjacent shell operators and redirections, and literal command strings passed to exec, execSync, execFile, execFileSync, spawn, or spawnSync (including member calls), with chains inside the command string such as execSync('cd web && prettier --write .');
  • command prefixes bunx, npx (with optional --yes), uvx, uv run, uv tool run, and python -m (also python3 and versioned Python 3 executables);
  • version pins on the formatter name, such as bunx prettier@3 --write ., uvx black@24.1.0 x.py, uvx ruff@0.6.0 format, or @latest/@next, and == pins after uvx or uv tool run (uvx black==24.1 .).

A bare formatter name needs a command boundary after it: a space, quote, closing parenthesis, shell operator, or end of line. A comma is not one, so a JavaScript line such as black, in an object or array literal is not reported.

lintro format and uv run lintro format delegate to Lintro and are allowed. prettier --check, ruff check, buf lint, taplo check, and sqlfluff lint are outside the matched formatting forms. The pure formatter binaries are matched regardless of their arguments. Eligible tools follow builtin FORMAT capability declarations: a test requires the pack’s formatter examples to equal those declarations, and real matcher tests execute every example. Biome has no builtin FORMAT declaration in this release and is therefore outside this pack.

Suppress a deliberate exception with Semgrep’s rule-specific comment on the invocation or the preceding line:

bunx oxfmt generated.mjs # nosemgrep: lintro.scripts.no-direct-formatter.native-command
execSync('bunx oxfmt generated.mjs'); // nosemgrep: lintro.scripts.no-direct-formatter.native-command

This is a generic, line-oriented regex heuristic, not a shell or JavaScript parser. Fixtures exercise the forms above, clean scripts, comments, suppressions, and excluded paths against real Semgrep. It does not resolve aliases, variables, computed commands, absolute executable paths, arbitrary runner flags, multiline commands, or subcommands split across argument arrays (for example spawnSync('ruff', ['format', file])). Bare spawnSync('black', [file]) is covered, as are literal Prettier write flags in the command string or its immediate argument array. Flags in later commands or unrelated JavaScript arguments do not make a check-only Prettier command match. Shell chains with quoted text before the separator can be missed; inside a literal exec-family command string they are matched.

Unsupported forms include formatter commands receiving a pipeline (cat x | black -), subshells (x=$(black g.py)), shell control flow (if black ...; then), environment prefixes (FOO=1 black x), and indirect runners such as xargs black or find ... -exec black .... Runner forms such as npx -y prettier --write, pnpm exec prettier --write, and yarn prettier --write are also unsupported, as are Python subprocess.run/os.system calls, JavaScript execa calls, and Bun shell templates.

The scripts/** glob includes non-shell files: Python assignments such as black = 1 and prose beginning with a formatter name can produce false positives. Command-like text in strings, block comments or heredocs can also produce false positives; review the reported line before changing a script. This pack reports at most one finding per matching line, including when a line contains multiple invocations. It does not prove that every native formatter shell-out has been removed.

Troubleshooting Configuration

Common Issues

1. Tool not respecting configuration:

# Check if config file is found
lintro check --tools ruff --verbose

# Verify config file syntax
ruff check --show-settings

2. Conflicting configurations:

# Check for multiple config files
find . -name "*.toml" -o -name ".ruff*" -o -name "setup.cfg"

# Use specific config
ruff check --config custom-ruff.toml

3. Performance issues:

# Profile tool execution
time lintro check --tools ruff --output-format grid

# Use more specific file patterns
lintro check "src/**/*.py" --tools ruff --output-format grid

Debug Configuration

# Enable verbose output
lintro check --verbose --output-format grid

# Check tool availability
lintro list-tools

# Test individual tools
ruff check src/
pydoclint src/main.py
prettier --check package.json

This comprehensive configuration guide should help you customize Lintro to fit your project’s specific needs and integrate seamlessly into your development workflow!