Split or Die
Enforce smaller, modular files by flagging oversized or complex code.

Features
- Scans the workspace and reports files larger than a size threshold.
- Uses real line counts in diagnostics and the oversized list.
- Runs on startup, on save, and via command palette.
- Activity Bar view to manage allowed extensions and exclusions.
- Exclude folders/files from the Explorer context menu.
- Scans only allowed extensions (configurable allowlist).
- Skips common build/vendor folders and cache folders by default.
Usage
- Activity Bar: open Split or Die to manage allowed extensions, exclusions, and oversized files.
- Size Threshold: adjust the KB threshold and click Apply.
- Command Palette:
Split or Die: Scan Workspace
- Explorer context menu:
Split or Die: Toggle Folder Exclusion
Split or Die: Toggle File Exclusion
Extension Settings
This extension contributes the following settings:
splitOrDie.enable: Enable or disable diagnostics.
splitOrDie.sizeThresholdKb: Report files larger than this size (KB). Default: 20.
splitOrDie.runOnStartup: Run a scan when VS Code finishes starting.
splitOrDie.runOnSave: Check the saved file and update diagnostics.
splitOrDie.excludeGlobs: Glob patterns excluded from scans.
- Default: common build/vendor/test/cache folders.
- Includes: node_modules, dist, out, build, coverage, target, vendor, .vscode, .vscode-test,
.svelte-kit, .vite, .turbo, .next, .nuxt, .angular, .vercel, .pnpm-store, .astro, .svelte,
pycache, .pytest_cache.
splitOrDie.includeExtensions: File extensions to scan (without leading dot).
- Default: popular programming languages and frameworks.
- Extensionless files are ignored by default.
Release Notes
1.0.4
- Fix packaging allowlist so all compiled modules are included.
1.0.3
- Added more non-code default exclusions (sqlite/jsonc/dotfiles).
- Internal refactor to split large extension modules.
| |