Troubleshooting
When something doesn’t work as expected, this guide helps you figure out why.
Analysis Issues
Section titled “Analysis Issues””No files found”
Section titled “”No files found””→ Analyzing project... Found 0 matching source filesCauses:
- Wrong directory
- No supported language files
- Files excluded by ignore rules (like
.gitignore)
Solutions:
Check you’re in the right place:
ls -la # Should see your source filesCheck supported extensions exist:
find . -name "*.py" -o -name "*.go" -o -name "*.rs" -o -name "*.ts" | headUse verbose mode for more details:
unfault review -v”Unknown language” or “Unsupported framework”
Section titled “”Unknown language” or “Unsupported framework””Unfault supports Python, Go, Rust, and TypeScript. If you’re using a different language, analysis won’t run.
For supported languages with unrecognized frameworks, analysis still works but framework-specific rules won’t apply.
Analysis is slow
Section titled “Analysis is slow”Large codebases take time, but if analysis seems stuck:
Check for symlink loops:
find . -type l -exec test -e {} \; -printNarrow the scope by running from a subdirectory:
# Instead of the whole repocd srcunfault reviewUse verbose mode to see progress:
unfault review -vDifferent results locally vs CI
Section titled “Different results locally vs CI”Common causes:
-
Different working directories
Make sure you’re running from the same directory in both environments.
-
Different git state
Terminal window # CI might have uncommitted changes excludedgit status -
Configuration differences
Check which config is loaded with verbose mode:
Terminal window unfault review -v
Output Issues
Section titled “Output Issues”JSON output is malformed
Section titled “JSON output is malformed”If JSON output appears truncated or malformed:
# Ensure nothing else writes to stdoutunfault review --output json 2>/dev/null > results.json“Finding not actionable”
Section titled ““Finding not actionable””If a finding doesn’t make sense for your code:
- Check if it’s a false positive specific to your pattern
- Use inline suppression with a comment explaining why:
# unfault: ignore[rule.id] -- reason this doesn't apply
- Report it if you think it’s a bug in the rule
LLM Issues
Section titled “LLM Issues””LLM provider not configured”
Section titled “”LLM provider not configured””The unfault review LLM summary feature requires a configured LLM provider. Configure one with:
# OpenAIunfault config llm openai --model gpt-4o
# Anthropicunfault config llm anthropic --model claude-3-5-sonnet-latest
# Ollama (local)unfault config llm ollama --model llama3.2Check current config:
unfault config showunfault config llm show“ANTHROPIC_API_KEY not set” / “OPENAI_API_KEY not set”
Section titled ““ANTHROPIC_API_KEY not set” / “OPENAI_API_KEY not set””The LLM provider needs an API key. Set the relevant environment variable:
export ANTHROPIC_API_KEY="..."export OPENAI_API_KEY="sk-..."Or pass the key directly when configuring:
unfault config llm anthropic --api-key "..."Observability Integration Issues
Section titled “Observability Integration Issues”SLO data not appearing
Section titled “SLO data not appearing”If you expect SLO enrichment but it’s not showing:
-
Check integration credentials are present:
Terminal window unfault config integrations show -
Verify connectivity:
Terminal window unfault config integrations verify -
Run without
--offline(if you were using it):Terminal window unfault review # Without --offline -
If cache may be stale, refresh it:
Terminal window unfault review --refresh-cache
Credentials not detected
Section titled “Credentials not detected”Unfault reads credentials from environment variables. Check the relevant provider:
| Provider | Variables |
|---|---|
| GCP | Application Default Credentials via gcloud auth application-default login |
| Datadog | DD_API_KEY, DD_APP_KEY |
| Dynatrace | DT_API_TOKEN, DT_ENVIRONMENT_URL |
Run unfault config integrations show to see what Unfault detects.
Configuration Issues
Section titled “Configuration Issues””Config not found” or wrong config loaded
Section titled “”Config not found” or wrong config loaded”Use verbose mode to see which config Unfault is loading:
unfault review -vCommon issues:
- Config is in wrong file (should be
pyproject.toml,Cargo.toml,package.json, or.unfault.toml) - TOML/JSON syntax errors in config
- Config key is misspelled
Validate your config:
# For TOMLpython -c "import tomllib; tomllib.load(open('pyproject.toml', 'rb'))"
# For JSONpython -c "import json; json.load(open('package.json'))"Rules not being excluded
Section titled “Rules not being excluded”If rules you’ve excluded still appear:
-
Check the path pattern matches:
# This excludes the rule everywhereexclude = ["python.http.missing_timeout"]# This excludes it only in tests/exclude = ["python.http.missing_timeout:tests/*"] -
Check for typos in rule IDs by looking at the finding output
LSP / Editor Issues
Section titled “LSP / Editor Issues”No diagnostics appearing in editor
Section titled “No diagnostics appearing in editor”- Check the language server output: run
unfault lsp --verbosemanually and look for errors. - Verify
unfaultis on yourPATHand runs without errors. - Check that your project root has a recognizable manifest file (
pyproject.toml,Cargo.toml,go.mod,package.json, etc.).
Slow first analysis in editor
Section titled “Slow first analysis in editor”The first run builds the full semantic graph for your project. Subsequent interactions use a cache and should be fast.
Verbose Mode
Section titled “Verbose Mode”For detailed diagnostics:
unfault review -vThis shows:
- Which config files are loaded
- Workspace detection details
- Files found and ignored
Getting Help
Section titled “Getting Help”Check your configuration
Section titled “Check your configuration”unfault config showThis shows your LLM and integration configuration.
Report an issue
Section titled “Report an issue”If you’ve found a bug or unexpected behavior:
- Check existing issues: github.com/unfault/unfault/issues
- If new, open an issue with:
- Unfault version (
unfault --version) - OS and architecture
- Verbose output (
unfault review -v) - Minimal reproduction steps
- Unfault version (
Quick Reference
Section titled “Quick Reference”| Symptom | Likely Cause | First Step |
|---|---|---|
| ”No files found” | Wrong directory | Check ls and pwd |
| Slow analysis | Large codebase | Run from subdirectory |
| Different results in CI | Different working directory | Ensure same path |
| LLM not working | No provider configured | unfault config llm show |
| Rules not excluded | Path pattern mismatch | Check TOML syntax |
| SLO data missing | Missing credentials | unfault config integrations show |