Skip to content

Troubleshooting

When something doesn’t work as expected, this guide helps you figure out why.

→ Analyzing project...
Found 0 matching source files

Causes:

  • Wrong directory
  • No supported language files
  • Files excluded by ignore rules (like .gitignore)

Solutions:

Check you’re in the right place:

Terminal window
ls -la # Should see your source files

Check supported extensions exist:

Terminal window
find . -name "*.py" -o -name "*.go" -o -name "*.rs" -o -name "*.ts" | head

Use verbose mode for more details:

Terminal window
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.

Large codebases take time, but if analysis seems stuck:

Check for symlink loops:

Terminal window
find . -type l -exec test -e {} \; -print

Narrow the scope by running from a subdirectory:

Terminal window
# Instead of the whole repo
cd src
unfault review

Use verbose mode to see progress:

Terminal window
unfault review -v

Common causes:

  1. Different working directories

    Make sure you’re running from the same directory in both environments.

  2. Different git state

    Terminal window
    # CI might have uncommitted changes excluded
    git status
  3. Configuration differences

    Check which config is loaded with verbose mode:

    Terminal window
    unfault review -v

If JSON output appears truncated or malformed:

Terminal window
# Ensure nothing else writes to stdout
unfault review --output json 2>/dev/null > results.json

If a finding doesn’t make sense for your code:

  1. Check if it’s a false positive specific to your pattern
  2. Use inline suppression with a comment explaining why:
    # unfault: ignore[rule.id] -- reason this doesn't apply
  3. Report it if you think it’s a bug in the rule

The unfault review LLM summary feature requires a configured LLM provider. Configure one with:

Terminal window
# OpenAI
unfault config llm openai --model gpt-4o
# Anthropic
unfault config llm anthropic --model claude-3-5-sonnet-latest
# Ollama (local)
unfault config llm ollama --model llama3.2

Check current config:

Terminal window
unfault config show
unfault 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:

Terminal window
export ANTHROPIC_API_KEY="..."
export OPENAI_API_KEY="sk-..."

Or pass the key directly when configuring:

Terminal window
unfault config llm anthropic --api-key "..."

If you expect SLO enrichment but it’s not showing:

  1. Check integration credentials are present:

    Terminal window
    unfault config integrations show
  2. Verify connectivity:

    Terminal window
    unfault config integrations verify
  3. Run without --offline (if you were using it):

    Terminal window
    unfault review # Without --offline
  4. If cache may be stale, refresh it:

    Terminal window
    unfault review --refresh-cache

Unfault reads credentials from environment variables. Check the relevant provider:

ProviderVariables
GCPApplication Default Credentials via gcloud auth application-default login
DatadogDD_API_KEY, DD_APP_KEY
DynatraceDT_API_TOKEN, DT_ENVIRONMENT_URL

Run unfault config integrations show to see what Unfault detects.

”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:

Terminal window
unfault review -v

Common 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:

Terminal window
# For TOML
python -c "import tomllib; tomllib.load(open('pyproject.toml', 'rb'))"
# For JSON
python -c "import json; json.load(open('package.json'))"

If rules you’ve excluded still appear:

  1. Check the path pattern matches:

    # This excludes the rule everywhere
    exclude = ["python.http.missing_timeout"]
    # This excludes it only in tests/
    exclude = ["python.http.missing_timeout:tests/*"]
  2. Check for typos in rule IDs by looking at the finding output

  1. Check the language server output: run unfault lsp --verbose manually and look for errors.
  2. Verify unfault is on your PATH and runs without errors.
  3. Check that your project root has a recognizable manifest file (pyproject.toml, Cargo.toml, go.mod, package.json, etc.).

The first run builds the full semantic graph for your project. Subsequent interactions use a cache and should be fast.

For detailed diagnostics:

Terminal window
unfault review -v

This shows:

  • Which config files are loaded
  • Workspace detection details
  • Files found and ignored
Terminal window
unfault config show

This shows your LLM and integration configuration.

If you’ve found a bug or unexpected behavior:

  1. Check existing issues: github.com/unfault/unfault/issues
  2. If new, open an issue with:
    • Unfault version (unfault --version)
    • OS and architecture
    • Verbose output (unfault review -v)
    • Minimal reproduction steps
SymptomLikely CauseFirst Step
”No files found”Wrong directoryCheck ls and pwd
Slow analysisLarge codebaseRun from subdirectory
Different results in CIDifferent working directoryEnsure same path
LLM not workingNo provider configuredunfault config llm show
Rules not excludedPath pattern mismatchCheck TOML syntax
SLO data missingMissing credentialsunfault config integrations show