Skip to content

fix(ci): resolve shellcheck/treefmt failures - #1894

Merged
shunkakinoki merged 1 commit into
mainfrom
fix/ci-shellcheck-treefmt-and-brew-clis
Jun 7, 2026
Merged

fix(ci): resolve shellcheck/treefmt failures#1894
shunkakinoki merged 1 commit into
mainfrom
fix/ci-shellcheck-treefmt-and-brew-clis

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes the failing GitHub Actions on main (Shell + Nix checks) and adds missing brew CLIs.

Failing GitHub Actions fixed

  • Shell / shell-lint was red: ShellCheck flagged SC2018/SC2019 in spec/npm_globals_spec.sh:251 (tr 'A-Z' 'a-z'), and since CI runs at default severity the info finding exited non-zero (xargs 123). Switched to POSIX classes tr '[:upper:]' '[:lower:]'.
  • Nix / nix-format (and downstream nix-flake / nix-test via treefmt check) was red: the same spec file was not shfmt-formatted. Applied the formatting treefmt --fail-on-change requires.

Both verified locally:

  • shellcheck spec/npm_globals_spec.sh -> clean
  • nix fmt -- --fail-on-change -> 0 changed

Brew CLIs added (nix-darwin/config/homebrew.nix)

  • stripe-cli (Stripe CLI; stripe is the homebrew/core alias, so no extra tap needed) - run stripe login after install
  • grafana
  • loki
  • argo

Summary by cubic

Fixes failing CI checks (ShellCheck and Nix/treefmt) and adds missing Homebrew CLIs. Pipeline is green again and devs get stripe-cli, grafana, loki, and argo.

  • Bug Fixes

    • Replaced tr 'A-Z' 'a-z' with tr '[:upper:]' '[:lower:]' to satisfy ShellCheck SC2018/SC2019 in spec/npm_globals_spec.sh.
    • Applied shfmt so treefmt/Nix format checks pass.
  • Dependencies

    • Added brews in nix-darwin/config/homebrew.nix: stripe-cli, grafana, loki, argo.

Written for commit 0d9cc60. Summary will update on new commits.

Review in cubic

…oki/argo brews

- spec: use POSIX [:upper:]/[:lower:] tr classes (SC2018/SC2019)
- spec: apply shfmt formatting that nix-format-check requires
- homebrew: add stripe-cli, grafana, loki, argo CLIs
@indent-zero

indent-zero Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor
PR Summary

Fixes CI failures in spec/npm_globals_spec.sh (shellcheck SC2018/SC2019 and shfmt/treefmt formatting) and declares four additional CLIs in the macOS Homebrew bundle so they aren't zapped on activation. Net effect: green CI on the spec file and argo, grafana, loki, and stripe-cli get installed on darwin-rebuild.

  • spec/npm_globals_spec.sh: replaced tr 'A-Z' 'a-z' with the POSIX-portable tr '[:upper:]' '[:lower:]' (matches the convention already used in install-npm-globals.sh), split a ;-compound line into two lines, and added shfmt-required spacing in the case pattern (arm64 | aarch64). All changes are functionally equivalent.
  • nix-darwin/config/homebrew.nix: appended argo, grafana, loki, and stripe-cli to brews in correct alphabetical position. All four are verified to exist in homebrew/core.

Issues

No issues found.

CI Checks

Waiting for CI checks...

@coderabbitai

coderabbitai Bot commented Jun 7, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: afbb149f-3121-496a-8a45-74868bc10283

📥 Commits

Reviewing files that changed from the base of the PR and between 50e2d88 and 0d9cc60.

📒 Files selected for processing (2)
  • nix-darwin/config/homebrew.nix
  • spec/npm_globals_spec.sh

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Summary by CodeRabbit

  • Chores

    • Updated development environment dependencies.
  • Tests

    • Refactored platform detection logic in test specifications.

Walkthrough

This PR adds four Homebrew formulas (argo, grafana, loki, stripe-cli) to the nix-darwin homebrew configuration, and refactors platform token derivation in the npm globals test spec from a compact single-line expression to explicit multi-line assignments for improved readability.

Changes

Homebrew Formulas Configuration

Layer / File(s) Summary
Homebrew formulas additions
nix-darwin/config/homebrew.nix
Four Homebrew formulas (argo, grafana, loki, stripe-cli) added to the homebrew.brews list at distinct positions in the configuration.

NPM Globals Test Refactoring

Layer / File(s) Summary
Platform token derivation refactoring
spec/npm_globals_spec.sh
Platform token computation logic in setup() expanded from a compact single-line expression into explicit multi-line assignments with clearer case statement handling for os_tok and cpu_tok mapping; semantic behavior unchanged.

Possibly related PRs

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A rabbit's brew of formulas bright,
Argo, Grafana, stripe in the night,
Loki logs glow with clarity fair,
Test tokens refined with methodic care,
Darwin's pantry grows strong and right! 🍺

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci-shellcheck-treefmt-and-brew-clis

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@shunkakinoki
shunkakinoki merged commit b745fdf into main Jun 7, 2026
30 of 34 checks passed
@shunkakinoki
shunkakinoki deleted the fix/ci-shellcheck-treefmt-and-brew-clis branch June 7, 2026 16:50

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds several Homebrew packages (argo, grafana, loki, and stripe-cli) to the nix-darwin configuration and refactors shell script syntax in spec/npm_globals_spec.sh. Feedback indicates that the formula name for the Stripe CLI should be corrected from 'stripe-cli' to 'stripe' to prevent installation failures.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

"reth"
"sheldon"
"sshpass"
"stripe-cli"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

In Homebrew Core, the formula name for the Stripe CLI is stripe, not stripe-cli. Using stripe-cli will cause the installation to fail as it is not a valid formula name in the core tap.

      "stripe"

@shunkakinoki shunkakinoki changed the title fix(ci): resolve shellcheck/treefmt failures and add stripe/grafana/loki/argo brews fix(ci): resolve shellcheck/treefmt failures Jun 7, 2026

@mesa-dot-dev mesa-dot-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Performed full review of 50e2d88...0d9cc60

Analysis

Lack of dependency scope clarity: Adding stripe-cli, grafana, loki, and argo to a shared Homebrew configuration without documenting whether these are universal developer requirements or role-specific raises concerns about environment bloat and unclear module boundaries—consider segregating tools by role (payments, DevOps, observability) to maintain separation of concerns.

No version pinning on Homebrew packages: Installing tools without pinned versions creates environment drift risk between developers and makes debugging environment-specific issues difficult; if reproducibility matters, establish a versioning strategy for operational tools.

Increased supply chain attack surface: Adding four new binary distributions without documented vetting criteria or vulnerability management process expands trust boundaries—clarify how new tool additions are approved and how updates/scanning will be managed going forward.

Tooling governance missing: No documented criteria for what belongs in this shared configuration and what constitutes required vs. optional tooling—establish explicit policy and guidelines to prevent ad-hoc dependency accumulation.

Tip

Help

Slash Commands:

  • /review - Request a full code review
  • /review latest - Review only changes since the last review
  • /describe - Generate PR description. This will update the PR body or issue comment depending on your configuration
  • /help - Get help with Mesa commands and configuration options

0 files reviewed | 0 comments | Edit Agent SettingsRead Docs

@mesa-dot-dev

mesa-dot-dev Bot commented Jun 7, 2026

Copy link
Copy Markdown

Mesa Description

TL;DR

Resolved failing CI linting checks (ShellCheck and treefmt) and added stripe-cli, grafana, loki, and argo to the Nix-Darwin Homebrew configuration.

What changed?

  • nix-darwin/config/homebrew.nix: Added argo, grafana, loki, and stripe-cli to Homebrew brews.
  • spec/npm_globals_spec.sh: Updated case conversion to POSIX classes (tr '[:upper:]' '[:lower:]') to fix ShellCheck warnings (SC2018/SC2019), and reformatted code to satisfy shfmt/treefmt styling checks.

Description generated by Mesa. Update settings

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