pingdotgg / pingdotgg/t3code

[Bug]: vp run lint:mobile skips ktlint/detekt and still exits 0 when Homebrew is unavailable

Open
#7,625 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
23k
Forks
5.9k
Avg merge
11h 14m
Merged PRs (30d)
357

Description

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

Build, CI, or release tooling

Steps to reproduce
  1. On a machine without Homebrew (any Windows checkout), clone the repo and run vp i.
  2. Confirm the tools are absent: ktlint --version and detekt --version both fail.
  3. Run vp run lint:mobile.
  4. Run echo $?.
Expected behavior

The command either runs the Kotlin checks, or fails clearly because it could not. A contributor should not be able to read a successful exit as "my Kotlin passed lint" when nothing was analyzed.

Actual behavior

The command prints three warnings and exits 0:

$ vp run lint:mobile
Found 8 Swift and 13 Kotlin native source files.
WARN: swiftlint is not installed; skipping SwiftLint. Install it with 'brew install swiftlint' or run 'brew bundle install --file apps/mobile/Brewfile'.
WARN: ktlint is not installed; skipping ktlint. Install it with 'brew install ktlint' or run 'brew bundle install --file apps/mobile/Brewfile'.
WARN: detekt is not installed; skipping detekt. Install it with 'brew install detekt' or run 'brew bundle install --file apps/mobile/Brewfile'.
Skipping generated native project folders: android/, ios/.
$ echo $?
0

Not one Kotlin file is analyzed. In scripts/mobile-native-static-check.ts, a missing tool routes to warnMissingTool and the run completes successfully; the only documented way to obtain the tools is apps/mobile/Brewfile and the brew install ... hints the warnings themselves print.

The macOS coupling is incidental rather than inherent: ktlint and detekt are plain JVM programs with no platform-specific components. Confirmed by running them on Windows 11 with Temurin JDK 17, using the published ktlint jar and detekt-cli zip — both honored apps/mobile/detekt.yml and apps/mobile/.editorconfig, and vp run lint:mobile then executed the full Kotlin check unmodified with the tools on PATH, reporting real violations. swiftlint genuinely requires macOS/Xcode and is skipped separately.

Scope: Homebrew is the blocker, not the OS. Windows has no Homebrew at all. Linux may work via Homebrew on Linux, but nothing in the repo documents that as a supported path, and I have not verified those formulae there.

CI is unaffected and still enforces the checks — .github/workflows/ci.yml runs this step on blacksmith-6vcpu-macos-26 after brew bundle install — so unchecked Kotlin does not reach main. The cost is local feedback: contributors without Homebrew get no signal until CI runs, and their local run looks green.

Relevant history: the Brewfile and scripts/mobile-native-static-check.ts arrived in #2013, and the CI step in #2899.

Impact

Minor bug or occasional failure

Version or commit

main @ fe281c5408164250da6688de6fc71ac12d8a9d8f

Environment

Windows 11 Pro 26200 (10.0.26200); Git Bash; Node/pnpm via Vite+; no Homebrew; Temurin JDK 17 installed manually.

Logs or stack traces

Full command output is in "Actual behavior". No stack trace is produced — the skip path is a warning, not an error.

Screenshots, recordings, or supporting files

N/A — the terminal output above is the complete evidence.

Workaround

Install a JDK, download the ktlint jar and detekt-cli zip from their GitHub releases, and put both on PATH. vp run lint:mobile then runs the Kotlin checks unmodified on Windows.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in scripts/mobile-native-static-check.ts at the warnMissingTool path used by vp run lint:mobile, then compare the tool requirements in apps/mobile/Brewfile with the CI step in .github/workflows/ci.yml. Reproduce with ktlint and detekt absent, and make the result clearly indicate whether Kotlin was checked; verify the command no longer reports an unchecked run as successful.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin, typescript
Domain
build-system, ci-cd, testing, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.