fix: better help for user without mise installs#40
Open
janderssonse wants to merge 6 commits intomainfrom
Open
fix: better help for user without mise installs#40janderssonse wants to merge 6 commits intomainfrom
janderssonse wants to merge 6 commits intomainfrom
Conversation
815d46d to
277586e
Compare
2c3ba06 to
2632fb1
Compare
Signed-off-by: Josef Andersson <josef.andersson@digg.se>
Move rumdl off the obsolete ubi backend. Signed-off-by: Josef Andersson <josef.andersson@digg.se>
Introduce utils/mise-tool.sh shared helpers and a fail_if_mise_install_incomplete guard sourced by every linter. Linters now fail with "run: mise install" when any pinned tool is missing, instead of falling through to a stray system copy on PATH. check-tools.sh labels each resolved tool as (mise) or (system). Escape hatch: DEVBASE_CHECK_ALLOW_SYSTEM_TOOLS=1. Signed-off-by: Josef Andersson <josef.andersson@digg.se>
Single preflight fails fast with one message listing missing pins, instead of cascading the same error through every linter. New --ignore-missing-linters flag (and DEVBASE_CHECK_IGNORE_MISSING_LINTERS env var) opt into running with a partial install. Unknown flags exit 2. Signed-off-by: Josef Andersson <josef.andersson@digg.se>
Per-linter guard now accepts tool-identifier args and only fires when one matches a missing pin — running ./linters/license.sh no longer errors because aqua:mvdan/sh is missing, only if pipx:reuse is. Each mise-pinned linter passes its tool. The node/* linters (no mise pin) drop the guard entirely. Signed-off-by: Josef Andersson <josef.andersson@digg.se>
2632fb1 to
b845283
Compare
Signed-off-by: Josef Andersson <josef.andersson@digg.se>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Description
The bug this started from
devbase-check runs linters via command -v . That trusts whatever's on PATH. The trap: if .mise.toml pins something
like pipx:reuse but pipx isn't installed on the host, mise install silently skips that pin. The linter then either finds a
stale system copy of reuse (wrong version, different behaviour) or fails with an opaque "not found". Nothing tells the user
the real cause is a half-done mise install.
So the theme of this branch is: mise is the source of truth for tool versions, and if mise says a pin is missing, we say so
— loudly, once, and with a clear way out.
What a user sees now
Running just lint-all with any pinned tool missing prints one message:
✗ mise install is incomplete — run: mise install
- pipx:reuse
(to skip: --ignore-missing-linters or DEVBASE_CHECK_IGNORE_MISSING_LINTERS=1)
Not once per linter — once, from a preflight at the top of verify.sh. Each linter still has its own guard, but when it fires
for a tool that isn't its own (e.g. running ./linters/license.sh while aqua:mvdan/sh is missing), it stays quiet — reuse
isn't broken, no point complaining.
If the user passes --ignore-missing-linters (or sets DEVBASE_CHECK_IGNORE_MISSING_LINTERS=1), the preflight warns and
proceeds; affected linters emit a skip marker so the summary table shows them as - with mise pin missing, instead of wrongly
passing because a stray binary was on PATH. For locked-down environments where mise install genuinely can't complete,
DEVBASE_CHECK_ALLOW_SYSTEM_TOOLS=1 disables the whole check.
Example illustrating how different features of this works in different scenarios:

Checklist