Skip to content

[codex] fix mobile native static analysis source discovery#2942

Merged
juliusmarminge merged 1 commit into
mainfrom
codex/fix-mobile-native-static-analysis
Jun 4, 2026
Merged

[codex] fix mobile native static analysis source discovery#2942
juliusmarminge merged 1 commit into
mainfrom
codex/fix-mobile-native-static-analysis

Conversation

@juliusmarminge
Copy link
Copy Markdown
Member

@juliusmarminge juliusmarminge commented Jun 4, 2026

What changed

  • Fixed scripts/mobile-native-static-check.ts so native module sources under apps/mobile/modules/**/ios and apps/mobile/modules/**/android are included in static analysis.
  • Kept generated top-level apps/mobile/ios and apps/mobile/android excluded.
  • Added a source-count log so CI makes it obvious when native files are being analyzed.

Why

The previous directory walker excluded any directory named ios or android by basename. That unintentionally skipped the checked-in Expo native module sources, so the mobile native static analysis job could succeed while linting no native module files.

Validation

  • vp check passed with existing nested-component lint warnings.
  • vp run typecheck passed.
  • vp run lint:mobile now reports Found 4 Swift and 2 Kotlin native source files.
  • ktlint and detekt ran locally against the Kotlin native module files and passed.

Note: local swiftlint validation was skipped because this machine lacks full Xcode, which Homebrew requires to install SwiftLint. CI's macOS image installs the Brewfile tools and should exercise SwiftLint.

Note

Fix mobile native static analysis to skip only root-level android/ and ios/ directories

  • Previously, android and ios were globally excluded in collectSources, causing similarly named subdirectories in other parts of the project to be skipped incorrectly.
  • Moves these two directory names into a new generatedNativeProjectDirectories set and only skips them when encountered at the project root.
  • Adds a root parameter to collectSources in mobile-native-static-check.ts to track the original root path through recursion.
  • Adds a log of discovered Swift and Kotlin file counts before linters run.

Macroscope summarized 4c8975c.


Note

Low Risk
CI script-only change that broadens which native files are linted; no runtime app or auth/data paths affected.

Overview
Fixes native source discovery in scripts/mobile-native-static-check.ts so Swift/Kotlin under Expo native modules (e.g. modules/**/ios and modules/**/android) are included in static checks again.

Previously, any folder named android or ios was skipped everywhere. Those names are now only ignored at the app root (apps/mobile/android and apps/mobile/ios), via generatedNativeProjectDirectories and a root argument passed through collectSources. A log line reports how many Swift and Kotlin files were found before linters run.

Reviewed by Cursor Bugbot for commit 4c8975c. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 4, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 74789c09-aa94-4c72-9ad5-ea5e96bf1ae5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-mobile-native-static-analysis

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

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Jun 4, 2026
@juliusmarminge juliusmarminge marked this pull request as ready for review June 4, 2026 06:11
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

🚀 Expo continuous deployment is ready!

  • Project → t3-code
  • Platforms → android, ios
  • Scheme → t3code-preview
  🤖 Android 🍎 iOS
Fingerprint 251694208975e82c56bd5289d014d27db782d79c 88f9ec34318a3522ac20299028ec60ca0080a665
Build Details Build Permalink
DetailsDistribution: INTERNAL
Build profile: preview:dev
Runtime version: 251694208975e82c56bd5289d014d27db782d79c
App version: 0.1.0
Git commit: fff460b4abc01f29f5b2cdb5bf25d955066816ee
Build Permalink
DetailsDistribution: INTERNAL
Build profile: preview:dev
Runtime version: 88f9ec34318a3522ac20299028ec60ca0080a665
App version: 0.1.0
Git commit: fff460b4abc01f29f5b2cdb5bf25d955066816ee
Update Details Update Permalink
DetailsBranch: pr-2942
Runtime version: 251694208975e82c56bd5289d014d27db782d79c
Git commit: 35c595d7a4f9135bee69cbd7908b150c0787bd76
Update Permalink
DetailsBranch: pr-2942
Runtime version: 88f9ec34318a3522ac20299028ec60ca0080a665
Git commit: 35c595d7a4f9135bee69cbd7908b150c0787bd76
Update QR

@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented Jun 4, 2026

Approvability

Verdict: Approved

Straightforward bug fix to a development script (mobile-native-static-check.ts) that corrects directory exclusion logic. The change only affects static analysis source discovery, not production runtime behavior, and has clear, limited scope.

You can customize Macroscope's approvability policy. Learn more.

@juliusmarminge juliusmarminge merged commit 80b40ce into main Jun 4, 2026
21 checks passed
@juliusmarminge juliusmarminge deleted the codex/fix-mobile-native-static-analysis branch June 4, 2026 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant