rushstack icon indicating copy to clipboard operation
rushstack copied to clipboard

[ rush scan] feat: modify rush scan, support executing projects under rush and custom scanning folders.

Open sherlockfeng opened this issue 11 months ago • 2 comments
trafficstars

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

  • executenode <path to rush>/libraries/rush-lib/lib-commonjs/start.js scan --json -o b --folder test-folder1 image

  • executenode <path to rush>/libraries/rush-lib/lib-commonjs/start.js scan --json -o a image

Why skip ScanAction.test.ts

image

sherlockfeng avatar Dec 16 '24 03:12 sherlockfeng