The dataset viewer is not available for this subset.
Exception: SplitsNotFoundError
Message: The split names could not be parsed from the dataset config.
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/datasets/inspect.py", line 286, in get_dataset_config_info
for split_generator in builder._split_generators(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 91, in _split_generators
pa_table = next(iter(self._generate_tables(**splits[0].gen_kwargs, allow_full_read=False)))[1]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 193, in _generate_tables
examples = [ujson_loads(line) for line in batch.splitlines()]
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/utils/json.py", line 20, in ujson_loads
return pd.io.json.ujson_loads(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Expected object or value
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/split_names.py", line 65, in compute_split_names_from_streaming_response
for split in get_dataset_split_names(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/inspect.py", line 340, in get_dataset_split_names
info = get_dataset_config_info(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/inspect.py", line 291, in get_dataset_config_info
raise SplitsNotFoundError("The split names could not be parsed from the dataset config.") from err
datasets.inspect.SplitsNotFoundError: The split names could not be parsed from the dataset config.Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Chahuadev Junk Sweeper
Ultimate Diagnostic Code Analysis Tool
Detect junk code with 95%+ accuracy in read-only, non-destructive analysis mode.
Built for developers who care about clean code. Junk Sweeper scans your entire project — JavaScript, TypeScript — and surfaces unused variables, dead imports, duplicate functions, and unreachable code through a live interactive dashboard and a draggable dependency graph. Zero code modifications. Diagnostic-only. Always safe.
Security Guarantee
Junk Sweeper is read-only by design — verified at the code level, not just by policy.
| Guarantee | How It Works |
|---|---|
| Never modifies user files | All detectors use fs.readFileSync() only — no writeFileSync() anywhere near your code |
| Never touches the OS | No registry writes, no admin privilege requests, no system calls outside the app's own data folder |
| Path Traversal Protection | Every scan path is validated against ../ traversal, symlinks, and forbidden OS directories (System32, /etc, /sys, /proc) |
| Executable Injection Prevention | Strict file-type whitelist — .exe, .dll, .bat, .sh and all binary formats are blocked before analysis |
| App Integrity on Every Launch | SHA-256 checksums of main.js, preload.js, and all detectors are verified before the app starts — tampered builds are rejected |
| Sandboxed Renderer | Electron runs with contextIsolation: true, sandbox: true, nodeIntegration: false — the UI has zero direct Node.js access |
| Audit Log | Every file access and security event is logged to ~/.chahuadev/logs/ for full traceability |
The only files the app ever writes are its own layout cache (%APPDATA%\Junk Sweeper\layouts\) and its own security audit log — nothing inside your project.
Key Features That Set Us Apart
While standard linters look for syntax errors, Chahuadev Junk Sweeper uses deep AST (Abstract Syntax Tree) analysis to understand the context and architecture of your entire project.
Silent Bug Catcher
Detects logical flaws that won't crash your app but will silently break your business logic:
| Pattern | What It Catches |
|---|---|
| Empty Catch Blocks | Errors swallowed with catch(e) {} — bugs disappear without a trace |
| Zombie Event Listeners | .addEventListener() without a matching .removeEventListener() — memory leaks that grow over time |
| Scope Shadowing | Inner variable re-declaring an outer name — logic in the outer scope runs on the wrong value |
| Floating Promises | async functions called without await inside try/catch — rejections go unhandled |
This is what separates Junk Sweeper from a plain linter. Your code compiles fine, your tests pass — and the bug ships anyway.
Interactive Architecture Map (n8n-style)
Not just a static graph. A fully interactive dependency diagram that maps every cross-file connection in your project:
- Left-to-Right auto-layout powered by Dagre — instantly see the flow of your architecture
- Drag nodes freely to group related files your way
- Save / Load / Copy Layout JSON — positions persist across sessions, so your team always sees the same organised view
- Bidirectional issue linking — click a file node to filter the Issues list; click the pin icon on any issue to fly to that node on the map
- Color-coded severity — Green (clean) / Amber (1–2 issues) / Red (3+ issues)
- Detects
require(),import,<script src>,loadFile(), IPC channels, andpreload:edges
One-Click VS Code Integration
Found an issue? Click the filename in the report and Junk Sweeper opens VS Code directly at the exact problematic line — no searching, no scrolling. The moment you see the issue, you're already in position to fix it.
Multi-Threaded Performance
Heavy AST analysis runs in Node.js Worker Threads — your UI stays smooth and responsive while scanning 1,000+ file projects in the background.
Dataset & Model Hub: huggingface.co/datasets/chahuadev/chahuadev-junk-sweeper
What It Detects
| Issue Type | Accuracy | Method |
|---|---|---|
| Unused Imports | 99% | AST (@babel/parser + @babel/traverse) |
| Unused Variables | 85–90% | AST + cross-file scope analysis |
| Dead Code | 90–98% | AST control-flow / reachability |
| Duplicate Functions | 88–94% | AST structural hash + semantic similarity |
| Silent Bugs (8 patterns) | 85–95% | AST pattern matching |
| Code Quality (10 patterns) | 80–100% | AST — debugger, eval, NaN, var, console, prototype… |
| SAST Security (6 levels L1–L6) | 85–95% | AST — injection, path traversal, hardcoded secrets, unsafe eval, prototype pollution… |
Every finding now includes a live recommendation generated from your actual code — real variable names, the exact problematic line, and a concrete fix example. No hardcoded templates.
Supports: JavaScript, TypeScript, JSX, TSX, HTML
All languages use full AST analysis for maximum accuracy.
Core Features
Static Code Analysis
- AST-based detection via
@babel/parser+@babel/traversefor JS/TS/JSX/TSX - 6 active detectors — unused variables, unused imports, dead code, duplicate functions, silent bugs, code quality
- Silent Bugs — 8 patterns: empty catch, floating promises, zombie listeners, orphaned timers, uncaught promise chains, scope shadowing, naked JSON.parse, await-in-loop
- Code Quality — 10 patterns: debugger statements, eval/new Function, NaN comparison, assignment-in-condition, parseInt without radix, var declaration, console.* debug logging, prototype mutation, overly long functions, TODO/FIXME markers
- Live AST recommendations — every finding shows real variable names, the actual code line, and a concrete fix example extracted from the AST at scan time — no hardcoded templates
- Common-sense filtering — permanent Node.js/Electron lifecycle events not flagged; stdlib module names and error callback names excluded from shadow warnings
- Confidence scoring — every finding includes an accuracy percentage and severity level
- Read-only analysis — safe diagnostic mode, zero code modification
SAST Security Scanner
- Dedicated SCAN SECURITY button — independent scan from junk analysis; runs in a separate Worker Thread
- 6-level severity (L1–L6) — from critical injection flaws to low-risk style-security issues
- Detects: SQL/NoSQL injection, command injection, path traversal, hardcoded secrets/tokens/passwords, unsafe
eval/new Function, prototype pollution, insecureMath.random, unvalidated redirects, and more - Security tab severity chips — ALL / CRITICAL / HIGH / MEDIUM / LOW filter chips sync with sidebar badge clicks
- Security Statistics Sidebar — severity breakdown with clickable severity badges (toggle mode) — syncs with security chips
- Map Monitor integration — security issue count + ⚠N badge shown on every affected file card
- Mutual exclusion — switching between Junk Scan and Security Scan automatically clears the previous result
Project Map Monitor
- Interactive n8n-style dependency graph — not a static image; every node is draggable, zoomable, and clickable
- SVG card nodes — color-coded by file type and issue severity; file-type badge (JS / TS / HT / JSON / etc.) on every node
- Dagre LR auto-layout — left-to-right hierarchical layout on first open; re-run anytime via the Auto-Layout button
- Layout Memory — positions saved to
%APPDATA%\Junk Sweeper\layouts\<project>.jsonautomatically; close and reopen the app and every node is exactly where you left it; share the JSON with your team via the Copy button - IPC channel edges — visualises Electron
ipcRenderer/ipcMainconnections - Dependency detection across JS, TS, HTML (
<script src>,<link href>), and Electron patterns (loadFile(),preload:) - Per-file issue badges — each node shows issue count with Green / Amber / Red status; ⚠N security badge appears above the role badge (non-overlapping)
- Node Status legend — Clean (green) / Minor (amber) / Critical (red) / npm (purple) / Gateway Box (orange pill) — collapsible, state persists
- Electron Role badges — MAIN / BR / UI / 🛡 / ⚙ role labels on key Electron files
- Bidirectional Issues ↔ Map linking — click the 📍 pin icon on any issue card to fly to that node on the map; click a node on the map to filter the Issues list to that file
- One-Click VS Code Integration — click any filename in the issue report to open VS Code at the exact problematic line
- Graph Export (⬆ Export button) — export the dependency graph in 4 formats:
- Copy as Mermaid — paste into GitHub, Notion, or any Markdown renderer
- Download Draw.io XML — open directly in diagrams.net / Draw.io
- Download Excalidraw JSON — import into Excalidraw
- Download Graphviz .dot — render with
dot,neato, or any Graphviz tool
- Free-drag — 8-direction resize + drag-anywhere code panel; nodes freely repositionable
Security-First Architecture
- 7-Layer Security Gateway: path validation, file-type whitelist, authentication, permission checks, audit logging, rate limiting, sandbox IPC isolation
- Path Traversal Protection — prevents directory traversal attacks
- Checksum Validation — file integrity verification on startup (production mode)
- Context Isolation — Electron
contextBridge/contextIsolation: true, no direct Node.js access in renderer
Report Export Formats
- JSON — machine-readable analysis data
- HTML — premium dark-theme interactive report with embedded CSS, Project Health Score, and all findings — shareable as a single file
- CSV — spreadsheet-compatible data export
- PDF — professional A4 PDF generated via native Electron
printToPDF— no printer required, works without a print dialog - SARIF 2.1.0 — Static Analysis Results Interchange Format; import directly into GitHub Code Scanning, Azure DevOps, VS Code SARIF Viewer, and CI/CD pipelines
All formats trigger the native OS Save File dialog via Electron IPC — no browser download workarounds.
Project Health Score
After every scan the sidebar displays a live Health Score ring: A (90–100) → B (75–89) → C (55–74) → D (35–54) → F (<35). Score is calculated from issue penalty points weighted by severity and confidence — gives an instant at-a-glance quality grade for the entire project.
Mark as False Positive
Every issue card has a "Mark as False Positive" button. Clicking it copies the exact suppress comment for that line to the clipboard — paste it above the flagged code to silence the finding in future scans. Works for all 6 detectors.
Per-Project Config — .junksweeper.json
Drop a .junksweeper.json file in your project root to override scan behaviour without touching the app:
{
"minConfidence": 0.5,
"ignorePatterns": ["node_modules/**", "dist/**"],
"detectors": { "code_quality": false },
"excludePatterns": ["*.test.js"]
}
Severity Filter Chips — Issues & Security Tabs
Both the Code Issues tab and the Security Issues tab have filter chips (ALL / HIGH / MEDIUM / LOW for junk; ALL / CRITICAL / HIGH / MEDIUM / LOW for security) that instantly narrow the visible findings.
Dual Interface
- Desktop App (Electron) — split-layout dashboard with live terminal, issue browser, code snippets, and project map
- CLI Tool —
junk-sweeper-clifor CI/CD pipelines
Getting Started
Option A — npm (Easiest, no Git needed)
npm install -g @chahuadev/junk-sweeper-app --foreground-scripts --force
junk-sweeper
The binary (~115 MB) is downloaded automatically on install. Then just type junk-sweeper to launch.
Option B — From Source
git clone https://huggingface.co/datasets/chahuadev/chahuadev-junk-sweeper
cd chahuadev-junk-sweeper
npm install
npm start
That's it. The app launches, the splash screen initialises the security gateway, and you're ready to pick a folder and scan.
Installation
npm Package (Windows)
npm install -g @chahuadev/junk-sweeper-app --foreground-scripts --force
The installer auto-downloads the correct binary for your platform. Use
--foreground-scriptsto see the download progress bar.
Desktop Application (from source)
Requires Node.js ≥ 22.0.0 and Electron 40+
npm install
npm start
Development mode (DevTools auto-open):
npm run dev
Command Line Interface
node junk-sweeper-cli.js scan ./src
node junk-sweeper-cli.js report ./src --format json
node junk-sweeper-cli.js report ./src --format html
node junk-sweeper-cli.js report ./src --format csv
Usage
Desktop Application
Scan for Junk & Code Quality Issues
- App launches with animated Splash Screen (security gateway initialisation)
- Click SELECT FOLDER → choose target directory
- Click START SCAN → monitor Live Terminal for real-time progress
- Browse detected issues in the Code Issues tab
Scan for Security Vulnerabilities (SAST)
- Select a folder (same or different project)
- Click SCAN SECURITY → dedicated SAST Worker Thread runs independently
- Security findings appear in the Security Issues tab with level, severity, and code snippet
- Use the sidebar severity badges (L1–L6) to filter findings — click the same badge again to clear the filter
View Analysis Results
- Live Terminal — real-time scan progress and status messages
- Code Issues — searchable, filterable list of all detected problems with file, line, confidence score, and inline code snippet
Project Map Monitor
- After scanning, click PROJECT MAP tab to open the interactive dependency graph in a separate window
- Nodes represent files; edges represent
require(),import,<script src>,loadFile(), IPC channels, etc. - Node color: Green = clean, Amber = 1–2 issues, Red = 3+ issues, Purple = npm package, Cyan = IPC/bridge
- Layout Memory: node positions save automatically on drag; use the hamburger menu (☰) to Save / Copy / Paste / Reset layout
- Bidirectional linking: click the 📍 pin icon on any issue card → map focuses that node; click a node in the map → Issues list filters to that file
- Hover a node to see full path and issue count; click to open its source code in the side panel
Export Report
- Click EXPORT REPORT → select JSON, HTML, CSV, or PDF
- The native OS Save dialog opens — choose your location and filename
- File is written directly by the Electron main process (no browser sandbox limitations)
Security Architecture
7-Layer Protection Stack
- Path Validation — prevents directory traversal attacks (
../etc.) - File Type Whitelist — only approved code file extensions are analysed
- Authentication Layer — validates user access before operations
- Permission System — checks read rights before file access
- Operation Audit Logging — complete trail of all IPC actions
- Rate Limiting — prevents scan-loop / DoS abuse
- Sandbox Isolation — Electron
contextIsolation: true,sandbox: true,nodeIntegration: false
Confidence Levels
- High (95%+) — highly reliable, recommended for automated pipelines
- Medium (50–95%) — requires manual verification
- Low (<50%) — likely false positives, informational only
Example Output
Live Terminal
[init] System initialized. Awaiting scan command...
[info] Scan started for directory: C:\projects\myapp
[info] Analyzing files (5 of 247)...
[success] Scan complete. Found 47 issues.
[success] High confidence: 34
[success] Medium confidence: 10
[success] Low confidence: 3
Analysis Report (JSON)
{
"scanDate": "2026-03-08T10:30:00Z",
"targetPath": "./src",
"totalIssuesFound": 47,
"confidenceBreakdown": { "high": 34, "medium": 10, "low": 3 },
"issues": [
{
"file": "src/app.js",
"line": 42,
"type": "unused_variable",
"message": "Variable 'tempVar' is declared but never used",
"confidence": 0.96,
"codeSnippet": "const tempVar = calculateValue();"
}
]
}
Configuration
.junksweeper.json (optional, place in project root)
{
"minConfidence": 0.5,
"languages": ["js", "ts", "py"],
"ignorePatterns": [
"node_modules/**",
"dist/**",
".git/**",
"test/**"
],
"maxScanDepth": 50,
"maxPathLength": 260
}
Project Structure
chahuadev-junk-sweeper/
├── main.js # Electron main process — IPC handlers, window management, startup watchdog
├── preload.js # Secure contextBridge IPC gateway for all windows
├── index.html # Main UI — split-layout dashboard (Terminal / Issues / Project Map tabs)
├── splash.html # Animated splash screen with preload bridge retry loop
├── map-monitor.html # Interactive dependency graph (vis-network, n8n-style, Layout Memory)
├── junk-sweeper-cli.js # CLI entry point
├── checksums.json # Integrity checksums (production)
├── backend/
│ └── utils/
│ ├── project-inspector.js # Dependency graph engine (AST + HTML/CSS/IPC)
│ ├── project-inspector-ipc.js # IPC bridge for inspector
│ ├── inspector-worker.js # Worker thread for dependency graph
│ ├── junk-scanner-worker.js # Worker thread for junk/code-quality scan
│ └── security-scanner-worker.js # Worker thread for SAST security scan
├── detectors/
│ ├── junk-detector.js # Main detection orchestrator (6 active detectors)
│ └── js-ts/
│ ├── ast-unused-variables-detector.js
│ ├── ast-unused-imports-detector.js
│ ├── ast-dead-code-detector.js
│ ├── ast-duplicate-functions-detector.js
│ ├── ast-silent-bug-detector.js # 8 silent-bug patterns — floating promises, empty catch, zombie listeners…
│ ├── ast-code-quality-detector.js # 10 code-quality patterns — debugger, eval, NaN, var, console.*, prototype…
│ └── ast-security-detector.js # SAST — 6-level (L1–L6) security vulnerability patterns
├── security/
│ ├── authentication-gateway.js # 7-layer security gateway
│ └── security-validator.js # Checksum validation
├── icons/
└── vendor/
├── dagre.min.js # Bundled offline dagre graph layout engine
└── vis-network.min.js # Bundled offline vis-network (no CDN dependency)
Key Technologies
| Technology | Role |
|---|---|
| Electron 40 | Desktop app framework |
| vis-network 9 | Interactive dependency graph |
| @dagrejs/dagre | LR hierarchical layout engine for the project map |
| @babel/parser + @babel/traverse | JS/TS/JSX/TSX AST parsing and traversal (all 5 detectors) |
| @swc/core | High-speed JS/TS compilation & analysis |
| parse5 | HTML parser (script/link dependency extraction) |
| esquery | AST query engine |
| estraverse | AST traversal utility |
| jscpd | Duplicate code detection support |
| typescript | TypeScript compiler API |
Changelog
v1.0.0 — Initial Release
- Read-only AST analysis, JSON/HTML/CSV export, Project Map Monitor, animated splash screen
- IPC dependency graph, Layout Memory (save/load/copy/reset)
- 5 detectors: Unused Variables, Unused Imports, Dead Code, Duplicate Functions, Silent Bugs
- 7-Layer Security Gateway: path validation, file-type whitelist, auth, permissions, audit log, rate limiter, sandbox
- SHA-256 checksum integrity verification on every launch
- One-Click VS Code Go-to-Line integration
- Worker Thread architecture — UI remains responsive during large scans
v1.0.1 — AST Recommendations & Code Quality
- 6th detector activated:
ast-code-quality-detector.js— 10 patterns includingdebugger,eval, NaN comparison, assignment-in-condition,parseIntwithout radix,vardeclarations,console.*, prototype mutation, overly long functions, and TODO/FIXME markers - Live AST-driven recommendations across all 6 detectors — every finding now shows the actual code line and real variable/function names extracted from the AST, plus a concrete before/after fix example. No more hardcoded template strings.
- Silent Bugs expanded to 8 patterns: added Naked
JSON.parse(no try/catch) and Await-in-Loop (serial awaits insidefor/forEach) - Collapsible Node Status legend in Project Map — click to collapse/expand; state persists in
localStorage - Terminal boot sequence now shows all 7 security layers and 6 active detectors on startup
v1.0.2 — SAST Security Scanner & Premium Export
- SAST Security Scanner — dedicated SCAN SECURITY button; runs
ast-security-detector.js(6-level L1–L6) in a separate Worker Thread independent of junk analysis - Security Issues Tab — severity-tagged findings (L1 Critical → L6 Low) with code snippet, file, and line; searchable list
- Security Statistics Sidebar — per-severity issue count with toggleable severity filter (click badge to filter, click again to clear)
- Map Monitor security count — total security findings shown in the stats bar of the dependency graph
- Mutual-exclusion scans — switching between Junk Scan and Security Scan automatically clears the previous result and UI
- PDF Export — premium A4 PDF via Electron
webContents.printToPDFwith dark-theme embedded CSS; no printer needed - Premium HTML Export — single-file shareable dark-theme report with all findings and embedded styles
- Native Save Dialog — all 4 export formats (JSON/HTML/CSV/PDF) use
dialog.showSaveDialogvia IPC — bypasses Electron renderer sandbox limitations - Security findings export — Export Report works after either Junk Scan or Security Scan
v1.0.3 — Health Score, SARIF, Config & QoL
- Project Health Score — A–F grade ring displayed in the sidebar after every scan; penalty-weighted by severity and confidence
- SARIF 2.1.0 Export — import into GitHub Code Scanning, Azure DevOps, VS Code SARIF Viewer, and any SARIF-compatible CI tool
- HTML Report includes Health Score — exported HTML report embeds the current grade alongside all findings
- Mark as False Positive — one-click button on each issue card copies the exact suppress comment to clipboard; paste above the flagged code to silence it in future scans
.junksweeper.jsonper-project config — drop a config file in project root to overrideminConfidence,ignorePatterns,detectorstoggles, andexcludePatternswithout touching the app- Issues tab severity chips — ALL / HIGH / MEDIUM / LOW filter chips for instant narrowing of the junk issues list
v1.0.4 — Security UX, Node Status Legend & Graph Export
- Security tab severity chips — ALL / CRITICAL / HIGH / MEDIUM / LOW chips in the Security Issues tab; sync with sidebar badge filter clicks
- Security ⚠N badge repositioned — security badge on map cards moved to mid-right above the Electron role badge; no longer obstructs role label
- Node Status legend — legend section renamed and reorganised: Clean / Minor / Critical / npm / Gateway Box with accurate colour coding
- Graph Export button (⬆ in map toolbar) — 4 export formats:
- Copy as Mermaid — paste into GitHub, Notion, or any Markdown renderer (
graph LRsyntax) - Download Draw.io XML (
.drawio) — open directly in diagrams.net - Download Excalidraw JSON (
.excalidraw) — import into Excalidraw - Download Graphviz .dot — render with
dot,neato, or any Graphviz tool
- Copy as Mermaid — paste into GitHub, Notion, or any Markdown renderer (
execFileshell injection fix inmain.js— VS Code Go-to-Line now usesexecFilewith array args instead ofexec()with shell string
Roadmap
- v1.1.0 —
.junksweeper.jsonGUI editor - v1.2.0 — ML-powered confidence refinement (97%+ accuracy)
- v1.3.0 — VS Code extension (Go-to-Line already live in the desktop app), JetBrains plugin
- v1.4.0 — AI-assisted analysis recommendations
- v1.5.0 — Real-time file-watch mode, incremental re-scan
Contributing
- Fork the repository
- Create a feature branch
- Add tests for new functionality (
npm test) - Ensure all tests pass
- Submit a pull request
License
MIT — See LICENSE
Support
- Email: chahuadev@gmail.com
- Website: https://chahuadev.com
- GitHub Issues: Report bugs and feature requests
- Documentation: See ./docs/
- Dataset / Model Hub: huggingface.co/datasets/chahuadev/chahuadev-junk-sweeper
Made by Chahuadev | Security-First Code Analysis Tools
- Downloads last month
- 185