Expand description
External static-analysis tool integration (PHPStan / PHPCS).
These run as child processes against a single saved file and their
findings are merged into the diagnostics the built-in mir-backed
analyzer already produces — see crate::lang::config::ExternalToolsConfig
for why both default off.
Modules§
- phpcs
- Runs PHPCS against a single file via
--report=jsonand maps its findings onto LSP diagnostics. - phpstan
- Runs PHPStan against a single file via
--error-format=jsonand maps its findings onto LSP diagnostics.
Structs§
- RunRegistry
- One in-flight run per file: a newer save, an edit or a close aborts the previous run, which kills its process and frees its slot.
Functions§
- acquire_
run_ slot - Wait for one of the [
MAX_CONCURRENT_RUNS] slots; hold it acrossrun_external_diagnosticsso rapid saves queue instead of piling up processes. - run_
external_ diagnostics - Run every enabled external tool against
pathand return their combined diagnostics. Tools run one after another rather than concurrently so a single caller gets one completeVecback instead of having to merge two independently-arriving results.