loadRulePacksConfigFromProjectRoot function

void loadRulePacksConfigFromProjectRoot(
  1. String projectRoot
)

Re-merges rule packs using projectRoot for config and lockfile (Phase 3).

Call when the real project root is known (e.g. first analyzed file). Removes only rule codes contributed by the previous pack merge so tier/diagnostics enables are preserved. If the analyzer already registered rules, newly added pack codes may not run until the next analysis server restart when cwd differed from projectRoot at plugin start.

Implementation

void loadRulePacksConfigFromProjectRoot(String projectRoot) {
  if (projectRoot.isEmpty) return;
  _reloadRulePacksFromRoot(projectRoot);
}