Skip to main content

Static Analysis

AIDE includes 4 built-in static analysers that detect code quality issues without external tools.

Analysers

AnalyserDetectsSeverities
complexityHigh cyclomatic complexity functionswarning, critical
couplingHigh fan-in/fan-out, import cycleswarning, critical
secretsHardcoded API keys, tokens, passwordscritical, warning
clonesDuplicated code blocks (copy-paste detection)warning, info

Running Analysis

aide findings run                         # Run all analysers
aide findings run --analyser=complexity # Run specific analyser
aide findings run --path=src/ # Scope to directory

Both --analyser= and --analyzer= are accepted on all commands.

Querying Findings

aide findings stats                      # Overview: counts by analyser and severity
aide findings list --severity=critical # All critical findings
aide findings list --file=src/auth # Findings in specific files
aide findings search "AWS" # Search findings by keyword

Accepting (Dismissing) Findings

Findings that are noise or irrelevant can be accepted (dismissed). Accepted findings are hidden from list, search, and stats output by default.

aide findings accept <id1> <id2>              # Accept specific findings by ID
aide findings accept --analyzer=clones # Accept all clone findings
aide findings accept --severity=info # Accept all info-severity findings
aide findings accept --file=cmd/ # Accept findings in a path
aide findings accept --all # Accept everything

aide findings list --include-accepted # Show accepted findings too
aide findings stats --include-accepted # Include accepted in counts

MCP Tools

3 findings-related MCP tools make analysis available to the AI during code review and debugging:

ToolPurpose
findings_searchFull-text search across findings
findings_listList findings filtered by analyser, severity, file, or category
findings_statsCodebase health overview with counts by analyser and severity
findings_acceptAccept (dismiss) findings by ID or filter

Auto-Run

When the file watcher is running (via aide mcp), findings are automatically re-run on changed files alongside code re-indexing.

Typical Workflow

  1. Use /aide:patterns to surface code health issues
  2. Use /aide:assess-findings to triage -- the AI reads actual code for each finding, accepts noise, and reports what remains actionable