Analyze changed files
statica_pre_analyzeAnalyze only changed files to summarize defects by rule before reporting. Covers this run's scope, never uploads, and flags missing project connection with a guided bootstrap.
Instructions
Run STATIC on the files that changed since the last analysis and summarize defects by rule. Never uploads. For C/C++ only changed translation units run; Java, Kotlin, Python and C# are analyzed in full and the summary is narrowed to changed files. Counts cover this run's scope, not the project total - say so when reporting, and do not list defects file by file. reason=NO_CHANGES usually means the Stop hook already analyzed the edit; do not suggest a rebuild or upload for it. code=NEEDS_BOOTSTRAP means the project is not connected: offer to connect it (statica_get_guide topic=bootstrap) and start only after the user agrees. reason=BOOTSTRAP_IN_PROGRESS means a connection was started earlier: resume it per the guide, never start over.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectDir": "<projectDir>"
},
"name": "statica_pre_analyze"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Re-analyze even when nothing changed. | |
| parallel | No | Analyzer parallelism. Omit for the default. | |
| projectDir | Yes | Absolute path of the project directory being analyzed (usually the session's working directory). |