Code Statistics
Code Statistics adds a collapsible view under VS Code Explorer to show:
- Selected total code lines in the current workspace.
- All detected text-code lines.
- Total counted files.
- Line counts grouped by file extension.
Behavior
- Uses workspace root
.gitignore rules when present.
- Detects binary files and excludes them from counting.
- Also ignores common generated/cache directories by default, including:
.git, node_modules, dist, build, out, coverage
.cache, .next, .nuxt, .turbo, .mypy_cache, .pytest_cache, .ruff_cache
.idea, .vscode, __pycache__, .venv, venv, target, tmp, temp
- Excludes common binary/media/archive artifacts by default (images, videos, audio, archives, etc.).
- Excludes common cache/binary suffixes by default (
*.pyc, *.pyo, *.class, *.map, *.log, *.lock, etc.).
Usage
- Open a folder/workspace in VS Code.
- Open the Explorer panel.
- Expand
Code Statistics.
- Click a file-type row to include/exclude it from
Selected Lines.
- Use
Select All / Clear Selection in the view title as needed.
- Click refresh in the view title to re-scan.
| |