Appearance
Scans & Snapshots
In BrowserStack Code Quality, a Scan is the active process of analyzing your code, while a Snapshot is the static "result" of that analysis at a specific point in time.
NOTE
Think of a Scan as the camera taking the photo, and the Snapshot as the photograph saved in your album.
1. How to Scan a Repository
Scanning allows you to analyze code across any branch, tag, or specific commit. For a full list of manual, automated, and remote scanning methods, visit our dedicated guide:
2. Scanning Fundamentals
Scanning detects bugs, vulnerabilities, and code smells. You can trigger a scan on a Branch, Tag, or specific Commit.
- Branch Scan: Analyzes the latest code available on the selected branch.
- Licensing: Your license determines the total number of scans and snapshots allowed. If you hit your limit, the system typically uses a "First-In-First-Out" (FIFO) logic to make room for new data.
3. Monitoring & Managing Scans
How to Monitor Progress
- Navigate to the Scan Queue from the left-hand navigation bar.
- View all ongoing scans, their current stage, and basic progress metrics.
- For a deep dive, click on any ongoing scan to open the Scan Details view and read real-time logs.
How to Abort a Scan
If a scan is taking too long or was triggered by mistake, you can stop it immediately:
- Option 1: Click the Abort Scan button on the top bar inside the repository being scanned.
- Option 2: Click Abort next to the scan entry in the Scan Queue or Scan Details page.
Scan History
Access the history to investigate past successes or failures.
- Open the Repository Context Menu (three dots).
- Select Scan History.
- View logs for any successful, failed, or aborted scan. Click Scan from this view to re-trigger a specific analysis.
4. Configuration & Customization
Repository Configuration (JSON)
Your scan behavior is defined by a repository-configuration.json file.
- How to Download: Go to the Repository List > Click Three Dots (...) > Select Download Repository Configuration.
Advanced Tweaks
- C/C++ Custom Extensions: By default, the scanner looks for standard extensions. To include custom ones (e.g.,
.pc,.pcc), edit theextensionsfield in your JSON config. - Overwrite Defaults: You can override global settings for a specific repository by committing a custom
repository-configuration.jsonto the root of your repo.
5. Managing Snapshots
A snapshot is generated after every successful scan. It allows you to "travel back in time" to see the code quality at that moment.
Snapshot Quotas & Deletion
- Automatic Deletion: If your quota is 30 and you run a 31st scan, the earliest snapshot is deleted automatically.
- Pinning (Keep Snapshot): To prevent accidental deletion of a specific milestone, select the Keep Snapshot (Pin) option in the Snapshots pop-up.
- Manual Deletion: Click the (X) button on any snapshot to remove it and free up quota space.
Snapshot Technical Details
Every snapshot captures the environment metadata of the scan. You can view these details in the Snapshot UI:
- Environment: OS Name (e.g., Linux), Version, and Architecture (amd64).
- Scanner Info: Version number and Proxy status (Host/Port).
- Flags: Status of
DELETE_CODEISSUES_FILESandEMB_C_CPP_USE_MULTILANG.
