#[cfg(not(target_family = "wasm"))]
pub mod phpcs;
#[cfg(not(target_family = "wasm"))]
pub mod phpstan;
#[cfg(not(target_family = "wasm"))]
use std::path::Path;
#[cfg(not(target_family = "wasm"))]
use tower_lsp_server::ls_types::Diagnostic;
#[cfg(not(target_family = "wasm"))]
use crate::lang::config::ExternalToolsConfig;
#[cfg(not(target_family = "wasm"))]
pub async fn run_external_diagnostics(
cfg: &ExternalToolsConfig,
path: &Path,
workspace_root: Option<&Path>,
) -> Vec<Diagnostic> {
let mut out = Vec::new();
if cfg.phpstan.enabled {
out.extend(phpstan::run(&cfg.phpstan, path, workspace_root).await);
}
if cfg.phpcs.enabled {
out.extend(phpcs::run(&cfg.phpcs, path, workspace_root).await);
}
out
}