vibertest scan
Analyze a JavaScript/TypeScript project for code quality issues. This is the primary command — it runs all enabled rules, scores the project 0-100, and outputs a detailed report.
Usage#
$ vibertest scan [path] [options]If no path is provided, ViberTest scans the current directory.
Arguments#
| Argument | Description | Default |
|---|---|---|
| [path] | Directory to scan | . |
Options#
| Flag | Description | Default |
|---|---|---|
| -r, --rules <rules> | Comma-separated list of rule IDs to run | all enabled |
| -f, --format <format> | Output format: "terminal" or "json" | terminal |
| -o, --output <path> | File path to write JSON report | — |
| -s, --silent | Suppress terminal output (useful with --format json) | false |
Examples#
Basic Scan#
Scan the current directory with all default rules:
$ vibertest scan .Scan a Subdirectory#
Only scan the src/ folder:
$ vibertest scan ./srcRun Specific Rules#
Only run security-related rules:
$ vibertest scan . --rules hardcoded-secrets,security-antipatternsExport JSON Report#
Generate a machine-readable JSON report:
$ vibertest scan . --format json --output report.jsonSilent Mode#
Suppress all terminal output — useful in CI pipelines where you only care about the exit code and JSON artifact:
$ vibertest scan . --format json --silent --output report.jsonExit Codes#
| Code | Meaning | When |
|---|---|---|
| 0 | Success — no issues | Clean scan, all rules pass |
| 1 | Issues found | At least one rule flagged an issue |
| 2 | Error | Scan failed (malformed config, internal error) |
Analyzed File Extensions#
ViberTest analyzes files with these extensions:
.ts.tsx.js.jsxHow Scanning Works#
When you run vibertest scan, the following pipeline executes:
- 1Config Resolution
Searches for
.vibertestrc.json,.vibertestrc.yaml, or other config formats via cosmiconfig. Merges with defaults. - 2File Collection
Collects all matching files using fast-glob, respecting ignore patterns. Default ignores: node_modules, dist, build, .next, coverage, .turbo, .git.
- 3Rule Execution
Runs all enabled rules against collected files. Each rule produces zero or more issues with severity, message, file path, and suggestion.
- 4Scoring
Calculates the 0-100 score using exponential decay with diminishing returns. Assigns a letter grade (A-F).
- 5Reporting
Outputs results to terminal (colorized, grouped by file) or writes a JSON report to disk.