Repository navigation
fix(builtins): preserve typos errors with custom shells - #1398
Conversation
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited) Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe PR adds BATS coverage for the ChangesTypos builtin test coverage
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The custom-shell regression cases are covered; no actionable merge risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
### 🚀 Features - **(builtins)** add kube-linter for plain Kubernetes manifests by [@zeitlinger](https://github.com/zeitlinger) in [#1394](#1394) - **(builtins)** add fix for editorconfig-checker by [@lucacome](https://github.com/lucacome) in [#1397](#1397) - **(builtins)** add dotnet formatting for C# and Visual Basic by [@zeitlinger](https://github.com/zeitlinger) in [#1393](#1393) - **(pkl)** support glob imports in hk configuration by [@jdx](https://github.com/jdx) in [#1423](#1423) ### 🐛 Bug Fixes - **(builtins)** preserve typos errors with custom shells by [@zeitlinger](https://github.com/zeitlinger) in [#1398](#1398) - **(config)** pick up pkl import changes that hk's config cache used to miss by [@jdx](https://github.com/jdx) in [#1422](#1422) - **(pre-push)** warn instead of crashing on malformed lines from stdin by [@connormharris](https://github.com/connormharris) in [#1352](#1352) ### 🧪 Testing - **(bats)** preinstall builtin tool stubs to stop spurious symlink failures by [@jdx](https://github.com/jdx) in [#1396](#1396) ### 🛡️ Security - add entire trail runners by [@jdx](https://github.com/jdx) in [#1399](#1399) ### 🔍 Other Changes - **(ci)** comment on a discussion when the PR implementing it merges by [@jdx](https://github.com/jdx) in [#1413](#1413) - re-pin aube-lock reusable workflow to current renovate-config main by [@jdx](https://github.com/jdx) in [#1388](#1388) - regenerate mise.lock on renovate branches so tool bumps stop failing every job by [@jdx](https://github.com/jdx) in [#1389](#1389) - fix macOS bats attempt-1 timeouts and publish builtin test timings by [@jdx](https://github.com/jdx) in [#1395](#1395) - remove entire and codex agent hooks by [@jdx](https://github.com/jdx) in [b23b605](b23b605) - re-pin renovate-config reusable workflows to current main by [@jdx](https://github.com/jdx) in [#1408](#1408) - stop compiling cargo-edit and rebuilding hk in every CI job by [@jdx](https://github.com/jdx) in [#1410](#1410) - re-pin renovate-config reusable workflows to current main by [@jdx](https://github.com/jdx) in [24fe99e](24fe99e) ### 📦️ Dependency Updates - update anthropics/claude-code-action action to v1.0.217 by [@renovate[bot]](https://github.com/renovate[bot]) in [#1382](#1382) - update dependency github:jdx/tak to v0.0.10 by [@renovate[bot]](https://github.com/renovate[bot]) in [#1384](#1384) - update rust crate dirs to v7 by [@renovate[bot]](https://github.com/renovate[bot]) in [#1386](#1386) - update dependency @modelcontextprotocol/ext-apps to v2 by [@renovate[bot]](https://github.com/renovate[bot]) in [#1387](#1387) - update anthropics/claude-code-action action to v1.0.219 by [@renovate[bot]](https://github.com/renovate[bot]) in [#1391](#1391) - update dependency vitest to v5 by [@renovate[bot]](https://github.com/renovate[bot]) in [#1385](#1385) - update dependency aube to latest by [@renovate[bot]](https://github.com/renovate[bot]) in [#1383](#1383) - update rust crate xx to v2.6.2 by [@renovate[bot]](https://github.com/renovate[bot]) in [#1406](#1406) - update rust crate pklr to v2.0.5 by [@renovate[bot]](https://github.com/renovate[bot]) in [#1407](#1407) - bump mr-boxington to 1.14.0 and drop the mbx fallback docs by [@jdx](https://github.com/jdx) in [#1409](#1409) - update zizmorcore/zizmor-action action to v0.6.4 by [@renovate[bot]](https://github.com/renovate[bot]) in [#1419](#1419) - update anthropics/claude-code-action action to v1.0.225 by [@renovate[bot]](https://github.com/renovate[bot]) in [#1414](#1414) - update anthropics/claude-code-action action to v1.0.226 by [@renovate[bot]](https://github.com/renovate[bot]) in [#1426](#1426) ### New Contributors - @connormharris made their first contribution in [#1352](#1352) - @zeitlinger made their first contribution in [#1398](#1398) - @lucacome made their first contribution in [#1397](#1397) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Version and documentation pin updates only; functional changes are already merged and summarized in the changelog. > > **Overview** > **Cuts release v2.1.0** by bumping the crate and CLI metadata from `2.0.1` to `2.1.0` (`Cargo.toml`, `Cargo.lock`, `hk.usage.kdl`, `docs/cli/commands.json`) and aligning every docs/example `package://…/hk@…` pin to the new release URL. > > Adds a **2.1.0 `CHANGELOG.md` section** (dated 2026-09-23) that records what ships in this tag: new builtins (kube-linter, editorconfig-checker fix, dotnet format), Pkl glob imports, config-cache and pre-push robustness fixes, typos/custom-shell behavior, trail runners, CI/test tweaks, and dependency bumps. The **2.0.1** entry date is corrected to 2026-09-15. > > No application logic changes appear in this diff—only release bookkeeping and documentation version strings. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f80e48e. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: mise-en-dev <123107610+mise-en-dev@users.noreply.github.com>
The
typosbuiltin captures its diagnostic output in a shell variable before returning it. With a custom shell that does not enableerrexit(for example,shell = "sh -c"), a failingtyposinvocation can otherwise be followed by the empty-output success path and incorrectly report success.Preserve the command's status explicitly before the empty-output check. The default hk shell already enables
errexit; this fix specifically protects custom shells that opt out of it.Tests cover invalid native configuration, the builtin check/fix cases, and both default-errexit and custom
sh -cshells.AI-assisted — Tool: Codex; model: OpenAI/unavailable; version: unavailable.
Summary by CodeRabbit
typoscheck and fix workflows.