This article explains how to keep Vibgrate scans focused by excluding paths you do not want analyzed. It is for developers tuning scan scope and runtime.
Overview
Real repositories contain directories that should not affect your DriftScore: build output, vendored dependencies, fixtures, and generated code. Excluding these keeps scans fast and your findings relevant. Vibgrate supports exclusions both in configuration and on the command line.
Exclusions in configuration
The most durable approach is to declare exclusions in your configuration file so they apply on every machine and in CI. Because the configuration lives in the repository (created by vg init), the whole team shares the same scope. See the Configuration reference for exclusion syntax.
One-off exclusions on the command line
When you need to narrow a single run without changing committed configuration, use the --exclude flag:
vg scan --exclude vendor
This is useful for experiments or for quickly checking how a directory affects the result. For permanent scope decisions, prefer configuration so the exclusion is reviewed and shared.
Choosing what to exclude
- Exclude generated and build directories that you never upgrade by hand.
- Exclude vendored third-party code you do not maintain.
- Be cautious about excluding application source: hiding code also hides real drift.
Verify the effect
After changing exclusions, re-run the scan and confirm the file count and findings reflect your intent:
vg
Related
See the Configuration reference and the .vibgrate config guide for committing durable exclusions, and the extended scanners overview to understand which paths each scanner reads.