Scan the current branch diff for common issues that could be flagged during PR review. This is a non-blocking check — always report findings as warnings and let the user decide what to act on.
Steps
-
Collect the diff
git diff main...HEAD --name-only git diff main...HEAD -
Check for missing tests
For each new or modified source file with non-trivial logic changes (not just config, docs, or styles), check whether a corresponding test file was added or updated.
Heuristic: a source file Foo.ts(x) should have a matching Foo.test.ts(x) (or Foo.view.test.tsx for components). Warn if:
- New exported functions/components have no corresponding test file changes
- Existing test files were not updated despite significant logic changes in the source
-
Check for missing JSDoc
Scan new exported functions, types, and components in the diff. Warn if any lack JSDoc comments.
-
Check for guideline violations
Look for obvious violations of
.github/guidelines/CODING_GUIDELINES.mdand.cursor/rules/patterns in the changed lines:anytype usage in TypeScriptStyleSheet.create()in new code- Raw
VieworTextimports fromreact-nativeinstead of design systemBox/Text import tw from 'twrnc'instead ofuseTailwind()hooknpxusage in scripts
Output
Print each finding as a warning line:
⚠ No tests detected for new logic in `app/core/Foo.ts`
⚠ Missing JSDoc on exported function `calculateFee` in `app/util/fees.ts`
⚠ `any` type used in `app/components/Bar.tsx:42`
⚠ `StyleSheet.create()` found in new file `app/components/Baz/Baz.tsx`
If no issues found, confirm:
✅ No readiness issues detected