Skip to main content
Sonar.tv
Back
Software Architecture Management in SonarQube | Sonar Summit 2026Now Playing

Software Architecture Management in SonarQube | Sonar Summit 2026

Sonar SummitMarch 4th 202618:01Part of SCEA

Learn how SonarQube's software architecture management features help teams visualize dependencies, enforce layering rules, and prevent architectural erosion as AI-generated code accelerates delivery.

Software architecture management is a critical component of maintaining code quality and preventing technical debt. At Sonar Summit 2026, Chris Chedy, a product manager at Sonar, demonstrated how SonarQube's new architecture feature enables teams to define, visualize, and enforce architectural constraints across their codebases. This feature comprises three main capabilities: current architecture extraction, intended architecture definition, and deviation detection—creating a comprehensive framework for architectural governance.

Understanding Current Architecture

The current architecture in SonarQube is automatically extracted from source code during each scan, ensuring that the architectural representation remains perpetually up-to-date. This capability provides a visual map of the entire codebase, displaying the containment structure and relationships between components. The visualization uses containment to represent the structural hierarchy—for example, in Java projects, classes are contained within packages, which are contained within modules. The layout is intelligently driven by dependencies, with relationships generally flowing from left to right across the diagram. The size of each container indicates the amount of code it contains, allowing developers to quickly grasp the overall architecture and identify patterns such as dependency chains or isolated components with no inter-dependencies.

Defining Intended Architecture and Detecting Deviations

The intended architecture feature allows teams to define which components should exist and what relationships are permitted between them. This is created through an interactive model where users can add containers at various hierarchy levels and specify allowed dependencies between sibling components. Once defined and saved, the intended architecture serves as a blueprint that subsequent scans will use to identify deviations. When the current architecture diverges from the intended design—such as when integration code uses parser code when no such relationship was intended—SonarQube generates specific issues for developers. These issues are linked directly to the problematic code references, providing developers with precise locations and context needed to remediate the architectural violations and bring the codebase into compliance.

Interactive Navigation and Iterative Improvement

The architecture dashboard provides intuitive tools for exploring both current and intended architectures. Users can click on any component to view its dependencies, switch to highlight mode for clearer visualization of complex relationships, and pan and zoom to navigate large codebases efficiently. This iterative approach to architecture management encourages continuous improvement: teams start by defining high-priority architectural constraints, address the resulting deviations, and then progressively extend the intended architecture to cover additional components. By maintaining architecture as a living document that evolves with the codebase, organizations can prevent architectural degradation while prioritizing their enforcement efforts where they matter most.

Key Takeaways

  • SonarQube's architecture feature automatically visualizes current code structure while enabling teams to define intended architecture and enforce architectural constraints
  • Deviations from intended architecture are automatically detected and reported as issues, linking developers directly to non-compliant code references
  • The interactive dashboard supports intuitive exploration of architecture through clicking, highlighting, panning, and zooming capabilities
  • Architecture management is designed as an iterative process, allowing teams to progressively expand architectural governance as enforcement priorities are met
  • The feature works across multiple languages and programming ecosystems by translating structural concepts like packages and modules to language-specific equivalents