You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Condition**: Objects and functions passed as props should be properly memoized or simplified to primitive values to prevent unnecessary re-renders.
151
-
-**Reasoning**: React uses referential equality to determine if props changed. New object/function instances on every render trigger unnecessary re-renders of child components, even when the actual data hasn't changed. Memoization preserves referential stability.
150
+
-**Applies ONLY to**: Objects (including arrays)/functions passed directly as JSX props. Does NOT apply to:
-**Reasoning**: New object/function references break memoization of child components. Only matters when child IS memoized AND parent is NOT optimized by React Compiler.
1.**First, get the list of changed files and their diffs:**
204
252
- Use `gh pr diff` to see what actually changed in the PR
205
253
- Focus ONLY on the changed lines, not the entire file
254
+
-**CRITICAL**: Only create inline comments on lines that are part of the diff. Do NOT add comments to lines outside the diff, even if they contain violations. Comments on unchanged lines will fail to be created.
206
255
2.**For analyzing changed files:**
207
256
-**For large files (>5000 lines):** Use the Grep tool to search for specific violation patterns instead of reading the entire file. Focus grep searches on the changed portions shown in the diff.
208
257
-**For smaller files:** You may read the full file using the Read tool
-`body`: Concise and actionable description of the violation and fix, following the below Comment Format
216
265
6.**Each comment must reference exactly one Rule ID.**
217
-
7.**Output must consist exclusively of calls to mcp__github_inline_comment__create_inline_comment in the required format.** No other text, Markdown, or prose is allowed.
266
+
7.**Output must consist exclusively of calls to createInlineComment.sh in the required format.** No other text, Markdown, or prose is allowed.
218
267
8.**If no violations are found, add a reaction to the PR**:
219
268
Add a 👍 (+1) reaction to the PR using the `addPrReaction` script (available in PATH from `.claude/scripts/`). The script takes ONLY the PR number as argument - it always adds a "+1" reaction, so do NOT pass any reaction type or emoji.
body: '<Body of the comment according to the Comment Format>'
241
-
```
287
+
288
+
**IMPORTANT**: Always use single quotes around the body argument to properly handle special characters and quotes.
242
289
243
290
If ZERO violations are found, use the Bash tool to add a reaction to the PR body:
244
291
@@ -258,4 +305,4 @@ addPrReaction.sh <PR_NUMBER>
258
305
<Suggested, specific fix preferably with a code snippet>
259
306
```
260
307
261
-
**CRITICAL**: You must actually call the mcp__github_inline_comment__create_inline_comment tool for each violation. Don't just describe what you found - create the actual inline comments!
308
+
**CRITICAL**: You must actually call the createInlineComment.sh script for each violation. Don't just describe what you found - create the actual inline comments!
0 commit comments