Bonfire.Common.ModuleAnalyzer (Bonfire v0.9.12-social-beta.70)
View SourceCommon functionality for analyzing the codebase.
This module provides the core functionality for scanning and analyzing modules across Bonfire applications, serving as a foundation for both the ExtensionBehaviour
registry and the ConfigSettingsRegistry
.
Summary
Functions
Get all modules from Bonfire-related applications.
Get all Bonfire-related applications based on name pattern.
Extract module info based on a custom extractor function.
Filter modules based on a predicate function.
Check if a module uses a particular module (via import, alias, or direct calls).
Flatten a hierarchical structure into a list.
Helper to run a GenServer that populates a persistent term cache.
Functions
Get all modules from Bonfire-related applications.
Returns a list of tuples {app_name, [module_list]}
Get all Bonfire-related applications based on name pattern.
Extract module info based on a custom extractor function.
The extractor should be a function that takes a module and returns a list of extracted data items or an empty list if nothing is found.
Filter modules based on a predicate function.
The predicate should be a function that takes a module and returns true/false.
Check if a module uses a particular module (via import, alias, or direct calls).
This implementation analyzes the module's abstract code to detect imports, aliases, and module references.
Flatten a hierarchical structure into a list.
Helper to run a GenServer that populates a persistent term cache.
This is a common pattern for both registries.