bito-code-review[bot] commented on code in PR #36896:
URL: https://github.com/apache/superset/pull/36896#discussion_r2723704241
##########
scripts/check-custom-rules.sh:
##########
@@ -42,7 +42,11 @@ done
# Only run if we have JS/TS files to check
if [ ${#js_ts_files[@]} -gt 0 ]; then
- node scripts/check-custom-rules.js "${js_ts_files[@]}"
+ # Process in chunks to avoid command line length limits on Windows
+ CHUNK_SIZE=100
+ for ((i=0; i<${#js_ts_files[@]}; i+=CHUNK_SIZE)); do
+ npm run check:custom-rules -- "${js_ts_files[@]:i:CHUNK_SIZE}"
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Broken error handling in chunked execution</b></div>
<div id="fix">
This change switches from running the custom rules check on all files at
once to processing in chunks of 100, but it breaks error accumulation and
complete file checking. Since each npm run is a separate process with its own
errorCount, errors in later chunks won't be counted if earlier chunks fail, and
the script may exit prematurely without checking all files.
</div>
</div>
<small><i>Code Review Run #d7acd7</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]