Skip to content

fix(lint): install caller-pinned mise tools; friendly error when a tool isn't pinned - #239

Merged
DevSecNinja merged 4 commits into
mainfrom
fix/lint-mise-tool-activation
Jul 3, 2026
Merged

DevSecNinja merged 4 commits into
mainfrom
fix/lint-mise-tool-activation

Conversation

@DevSecNinja

@DevSecNinja DevSecNinja commented Jul 3, 2026 •

Copy link
Copy Markdown
Owner

Problem

Every mise-based linter job (dprint, yamlfmt, yamllint, actionlint, gitleaks, shfmt, checkov, trivy, zizmor) failed at runtime with:

mise ERROR No version is set for shim: <tool>

Root cause: the jobs installed each tool with install_args: "<tool>", which installs but does not activate a version, so mise exec -- <tool> couldn't resolve it.

Approach

Rather than have the central workflow own tool versions (unpinned @latest, or hardcoded versions here), let each consuming repo pin its lint tools in its own Renovate-managed mise config. The workflow now:

  • installs from the caller's config (jdx/mise-action with install: true, no install_args);
  • in each job, verifies a mise config exists and the specific tool is pinned, failing with a friendly, actionable error otherwise;
  • runs the tool via mise exec -- <tool> (resolving the caller's pinned version).

This keeps versions pinned + Renovate-managed in the repos that use the tools, and out of this central tenant.

Verification

Validated locally with mise 2026.7.0:

# pinned in .mise.toml (dprint = "0.55.1")
mise install && mise which dprint   # -> installs/resolves
mise exec -- dprint --version       # -> dprint 0.55.1

# tool not pinned
mise which yamlfmt                   # -> exit 1 (drives the friendly error)

Consuming repos must add the lint tools to their mise.toml (a companion docs/convention update covers this). Discovered while onboarding lint to DevSecNinja/az-vm-start-stop.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

The linter jobs installed each tool with mise but never activated a version, so
'mise exec -- <tool>' failed with 'No version is set for shim'. Pass the version
request to exec directly ('mise exec <tool>@latest -- <tool>'; pipx-backed tools
use 'pipx:<tool>@latest') so the tool resolves and runs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@DevSecNinja DevSecNinja changed the title fix(lint): activate mise tool versions via 'mise exec <tool>@latest' fix(lint): install caller-pinned mise tools; friendly error when a tool isn't pinned Jul 3, 2026
DevSecNinja and others added 2 commits July 3, 2026 16:15
…ersions

Install lint tools from the consuming repo's Renovate-managed mise config
(install: true, no install_args) and, per job, verify a mise config exists and
the needed tool is pinned — failing with a friendly, actionable error if not —
then run via 'mise exec -- <tool>'. Keeps tool versions pinned and
Renovate-managed in the repos that use them, not in this central tenant.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… any missing arg)

The guard used 'ls fileA fileB ... >/dev/null' which exits non-zero if ANY
listed path is missing, so it reported 'No mise config found' even when a
.mise.toml existed. Use explicit 'test -f' checks instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
DevSecNinja added a commit to DevSecNinja/az-vm-start-stop that referenced this pull request Jul 3, 2026
Uses the fixed reusable lint workflow (installs tools from this repo's
.mise.toml). Revert to the released tag once DevSecNinja/.github#239 ships.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The shellcheck job's command is a subshell '(... mise exec -- shellcheck)', so
the tool-name extraction captured 'shellcheck)' with the paren, producing
invalid shell in the guard. Use the bare 'shellcheck' bin name.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@DevSecNinja
DevSecNinja merged commit 56235e1 into main Jul 3, 2026
16 checks passed
@DevSecNinja
DevSecNinja deleted the fix/lint-mise-tool-activation branch July 3, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant