Unfault VS Code Extension
Production-readiness linting for your code. Detect stability, performance, and reliability issues before they reach production.
Features
- Real-time Analysis: Get instant feedback as you code with diagnostics that appear in your editor
- Quick Fixes: Apply suggested fixes with a single click using VS Code's code actions
- File Centrality: See file importance and impact in the status bar (e.g., "Hub file", "Leaf file")
- Multi-language Support: Python, Go, Rust, TypeScript, and JavaScript
- Privacy First: Code is parsed locally by the CLI, only analyzed IR is sent to the Unfault API
Requirements
Unfault CLI: Install the unfault CLI:
cargo install unfault
API Key: Login to authenticate:
unfault login
Installation
- Install this extension from the VS Code Marketplace
- Make sure
unfault is in your PATH, or configure the path in settings
Configuration
| Setting |
Description |
Default |
unfault.executablePath |
Path to the unfault CLI executable |
unfault |
unfault.trace.server |
Trace LSP communication for debugging |
off |
How It Works
The extension automatically manages everything for you. When you open a supported file:
- The extension automatically starts the Unfault CLI in LSP mode (you don't need to run anything manually)
- Client-side parsing: Your code is parsed locally by the CLI
- IR analysis: Only analyzed IR is sent to the Unfault API (no source code leaves your machine)
- Findings returned: The API returns findings with suggested fixes
- Diagnostics displayed: Findings appear as squiggly underlines in VS Code
- Status bar: Shows file centrality (e.g., "Hub file (12 importers)")
When you close VS Code, the server shuts down automatically.
Supported Languages
- Python (.py)
- Go (.go)
- Rust (.rs)
- TypeScript (.ts, .tsx)
- JavaScript (.js, .jsx)
Commands
- Unfault: Restart LSP Server - Restart the language server
Troubleshooting
"unfault: command not found"
The CLI is not in your PATH. Either:
- Add the directory containing
unfault to your PATH
- Configure
unfault.executablePath in VS Code settings
No diagnostics appearing
- Check the Output panel (View > Output) and select "Unfault LSP"
- Make sure you're logged in:
unfault login
- Try restarting the server: Command Palette > "Unfault: Restart LSP Server"
License
MIT
| |