Skip to content

Conversation

@ArgoZhang
Copy link
Member

@ArgoZhang ArgoZhang commented Sep 20, 2025

Link issues

fixes #6764

Summary By Copilot

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Merge the latest code from the main branch

Summary by Sourcery

Enhancements:

  • Introduce delete-bin.cmd script to clean up BIN and OBJ folders across the project

Copilot AI review requested due to automatic review settings September 20, 2025 06:39
@bb-auto bb-auto bot added the chore This are tasks or bot action label Sep 20, 2025
@bb-auto bb-auto bot added this to the 9.10.0 milestone Sep 20, 2025
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Sep 20, 2025

Reviewer's Guide

Adds a Windows batch script tool that recursively finds and deletes all bin and obj directories (excluding those under node_modules), providing console feedback and a pause at the end.

File-Level Changes

Change Details Files
Introduce delete-bin.cmd Windows cleanup script
  • Silence command echoing and clear console on start
  • Use FOR /d /r to recursively locate bin and obj folders
  • Filter out paths containing node_modules with FIND
  • Remove found directories quietly using rd /s /q
  • Print progress messages and pause before exit
delete-bin.cmd

Assessment against linked issues

Issue Objective Addressed Explanation
#6764 Add a tool (script) for deleting all BIN and OBJ folders, excluding those under node_modules.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@ArgoZhang ArgoZhang merged commit 631f9c2 into main Sep 20, 2025
3 of 5 checks passed
@ArgoZhang ArgoZhang deleted the chore-bin branch September 20, 2025 06:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a Windows batch script tool for cleaning up .NET build artifacts by deleting bin and obj folders from the project directory tree. The script addresses issue #6764 by providing developers with an automated way to clean build outputs.

  • Adds a new Windows batch file for deleting bin and obj directories recursively
  • Implements logic to skip node_modules directories to avoid deleting Node.js dependencies
  • Provides user feedback during the deletion process

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +8 to +17
IF EXIST "%%d" (
ECHO %%d | FIND /I "\node_modules\" > Nul && (
ECHO.Skipping: %%d
) || (
ECHO.Deleting: %%d
rd /s/q "%%d"
)
)
)

Copy link

Copilot AI Sep 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The node_modules exclusion logic is flawed. The FIND command will match any path containing '\node_modules' anywhere in the string, which could incorrectly skip legitimate bin/obj folders that happen to contain this substring in their path. Consider using a more precise pattern match or checking if the parent directory is specifically named 'node_modules'.

Suggested change
IF EXIST "%%d" (
ECHO %%d | FIND /I "\node_modules\" > Nul && (
ECHO.Skipping: %%d
) || (
ECHO.Deleting: %%d
rd /s/q "%%d"
)
)
)
IF EXIST "%%d" (
REM Extract parent directory name
FOR %%p IN ("%%~dpd.") DO (
SET "PARENT=%%~nxp"
CALL :CheckNodeModules "%%d" "%%PARENT%"
)
)
)
GOTO :EOF
:CheckNodeModules
SETLOCAL ENABLEDELAYEDEXPANSION
SET "DIR=%~1"
SET "PARENT=%~2"
IF /I "!PARENT!"=="node_modules" (
ECHO.Skipping: !DIR!
) ELSE (
ECHO.Deleting: !DIR!
rd /s/q "!DIR!"
)
ENDLOCAL
EXIT /B

Copilot uses AI. Check for mistakes.
Comment on lines +13 to +14
rd /s/q "%%d"
)
Copy link

Copilot AI Sep 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The /q flag suppresses confirmation prompts, making this command potentially destructive without user awareness. Consider adding a confirmation prompt or verbose logging before deletion to prevent accidental data loss.

Suggested change
rd /s/q "%%d"
)
CHOICE /C YN /N /M "Are you sure you want to delete this folder? (Y/N): "
IF ERRORLEVEL 2 (
ECHO Skipped: %%d
) ELSE (
rd /s/q "%%d"
)

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore This are tasks or bot action

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(Tools): add delete-bin tools

2 participants