plugins.discover_plugins

plugins.discover_plugins(registry, *, strict=True, warn_missing_tools=True)

Discover and load check plugins.

Scans for entry points in the ‘pycmdcheck.checks’ group and calls each registered function with the provided registry. Each entry point should point to a function that accepts a CheckRegistry and adds checks to it.

This function also: - Extracts plugin metadata (version, required tools) - Checks if required external tools are available - Detects check ID conflicts between plugins - Tracks which plugin registered each check ID

Args: registry: The CheckRegistry to pass to plugin register functions strict: If True, raise PluginConflictError on check ID conflicts. If False, skip the conflicting plugin and warn. warn_missing_tools: If True, warn about missing tools and skip checks from plugins with missing dependencies.

Returns: List of successfully loaded plugin names

Raises: PluginConflictError: If strict=True and two plugins register the same check ID