Enable Greenlight auto-scan in VS Code
You can enable auto-scan to have Veracode Greenlight automatically scan any file that is in focus in your IDE as soon as you save it, as long as the file compiles successfully.
Before you begin:
Confirm that you meet the Greenlight prerequisites.
You can use the auto-scan feature only if a network connection is available. Otherwise, Veracode Greenlight for VS Code logs an information message that the feature is disabled.
Scans that you start yourself manually take precedence over scans that start automatically. Greenlight never initiates a new automatic scan while another scan is already running, whether it is an automatic scan or one you started yourself.
When a scan is ongoing, Greenlight adds newly saved files to a queue in the order that they are saved.
The Veracode scan queue shows the priority in which Greenlight scans the files. Because manually initiated scans always take precedence, the queue only shows automatically initiated scans. The scans in the queue occur 30 seconds apart as long as the files compile successfully. If a file does not compile, a message appears in the log file and Greenlight does not scan the file.
To complete this task:
- In VS Code, click the Manage icon and select Settings.
- Select User > Extensions > Veracode.
- Select Automatically scan files with Veracode Greenlight when they are saved.