Angular Modernizer
    Preparing search index...

    Architecture and Code Quality Analysis Plugin

    Provides analysis rules for architectural patterns, code quality and maintainability. It has no transformation or validation rules.

    During ArchitecturePlugin.initialize it loads .angular-modernizer.json from the kernel's project root: rules for rule options and layers / layersSource for the layer topology used by LayerBoundaryViolationRule and ContentPlacementRule. When both layers and layersSource are set, layersSource wins and the differences are available from ArchitecturePlugin.getLayerDriftWarnings. A config that fails to load is logged; the rules then run with defaults and without layers.

    • CircularDependencyRule (solid:circular-dependency): runtime import cycles
    • ImportDirectionViolationRule (solid:import-direction-violation): imports against conventional layer directions
    • LayerBoundaryViolationRule (architecture:layer-boundary-violation): imports against the configured layer topology
    • ContentPlacementRule (architecture:content-placement): files outside the layers allowed for their content type
    • GodObjectRule (solid:god-object-violation): classes that are too large or mix concerns
    • ComponentComplexityRule (architecture:component-complexity): components with too many methods or mixed responsibilities
    • ServiceArchitectureRule (architecture:service-architecture): services exporting models or with too many dependencies
    • ServiceBagAnalysisRule (architecture:service-bag): services mixing concerns or backend areas
    • StaticInStatefulClassRule (architecture:static-in-stateful-class): public static methods in classes with instance state
    • LibraryExtractionAnalysisRule (architecture:library-extraction-opportunity): artifact groups to extract into libraries
    • architecture:model-separation: files that export models next to implementation code
    • architecture:rxjs-memory-leak: undisposed subscriptions and missing takeUntil
    • architecture:advanced-content-placement: folder structure and domain-driven design patterns
    • architecture:error-handling-pattern: improper error handling
    • architecture:inheritance-analysis: deep inheritance chains and god base classes
    • architecture:performance-pattern: performance anti-patterns
    • architecture:cross-file-architecture: imports against the layer direction (e.g. a service importing a component)

    The last seven rule classes are not exported; they are reachable only through ArchitecturePlugin.getAnalysisRules.

    Implements

    Index

    Constructors

    Properties

    author: "Angular Modernization Platform" = 'Angular Modernization Platform'

    Plugin author.

    description: "Provides architecture and code quality analysis for maintainable code" = 'Provides architecture and code quality analysis for maintainable code'

    Plugin description.

    name: "@angular-modernizer/plugin-architecture" = '@angular-modernizer/plugin-architecture'

    Unique plugin identifier.

    version: "0.1.0" = '0.1.0'

    Plugin version reported to the kernel.

    Methods

    • Differences between inline layers and layersSource found during initialization (empty when only one is configured or both agree).

      Returns readonly string[]

    • Initialize the plugin: loads rule options and the layer topology from the project config (see the class description).

      Parameters

      • kernel: IKernel

        The Kernel instance for accessing infrastructure

      Returns Promise<void>