rushstack
rushstack copied to clipboard
[ rush scan] feat: modify rush scan, support executing projects under rush and custom scanning folders.
Summary
- Support for using -o to specify the project to be scanned in a repository that has been connected to rush.
- Support for specifying the folder to be scanned.
Details
When I was migrating a pnpm workspace project to rush.
I first set up rush.json and wrote in all the projects.
Using -o to specify the project to be scanned can avoid me going into each project directory to execute scan.
The folders to be scanned under the project are not uniform, so I got all the folders under the project, and used ignore to read the .gitignore file to exclude, and finally got all the folders to be scanned, so this requires customizing the folders to be scanned.
How it was tested
-
build rush-lib
-
cd
libraries/rush-lib/src/cli/actions/test/scanRepo -
execute
node <path to rush>/libraries/rush-lib/lib-commonjs/start.js scan --json -o b --folder test-folder1 -
execute
node <path to rush>/libraries/rush-lib/lib-commonjs/start.js scan --json -o a