[codex] fix mobile native static analysis source discovery#2942
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
🚀 Expo continuous deployment is ready!
|
ApprovabilityVerdict: Approved Straightforward bug fix to a development script ( You can customize Macroscope's approvability policy. Learn more. |
What changed
scripts/mobile-native-static-check.tsso native module sources underapps/mobile/modules/**/iosandapps/mobile/modules/**/androidare included in static analysis.apps/mobile/iosandapps/mobile/androidexcluded.Why
The previous directory walker excluded any directory named
iosorandroidby 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 checkpassed with existing nested-component lint warnings.vp run typecheckpassed.vp run lint:mobilenow reportsFound 4 Swift and 2 Kotlin native source files.ktlintanddetektran locally against the Kotlin native module files and passed.Note: local
swiftlintvalidation 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/andios/directoriesandroidandioswere globally excluded incollectSources, causing similarly named subdirectories in other parts of the project to be skipped incorrectly.generatedNativeProjectDirectoriesset and only skips them when encountered at the project root.rootparameter tocollectSourcesin mobile-native-static-check.ts to track the original root path through recursion.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.tsso Swift/Kotlin under Expo native modules (e.g.modules/**/iosandmodules/**/android) are included in static checks again.Previously, any folder named
androidorioswas skipped everywhere. Those names are now only ignored at the app root (apps/mobile/androidandapps/mobile/ios), viageneratedNativeProjectDirectoriesand arootargument passed throughcollectSources. 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.