Sonargraph-Architect is a general purpose static analysis tool, best described as the Swiss army knife for architects, quality analysts and developers. It supports C#, C/C++, Java/Kotlin, TypeScript, Go and Python 3; more languages will follow.

What you get

  • Architecture rules as code, checked in the IDE and in every build
  • Dependency visualizations that make the structure of any code base visible
  • A break-up computer that finds the cheapest way out of cyclic dependencies
  • Hundreds of metrics, quality gates and baselines that can fail the build
  • Duplicate code detection and a Groovy scripting engine for your own checks
  • The best available tool for modernizing legacy applications

Architecture as code

Describe the architecture of your system in our easy to learn architecture DSL. Sonargraph checks every dependency in the code against it, in the IDE and in the CI build, so the architecture you designed is the architecture you ship. Watch the video and read our blog article "How to organize your code" to learn more.

Understand any code base

Sonargraph's dependency views show the structure of a system at every level, from modules down to single methods, and every arc can be tracked to the line of code that causes it.

  • The exploration view lays elements out as a tree with directional arcs; cyclic groups are marked in red
  • The graph view renders any selection as a layered graph; the cycle view isolates one cyclic group
  • Drill down, expand incoming or outgoing dependencies, and jump to the source
Sonargraph exploration view of the jPOS packages with cyclic dependencies
Exploration view of an open source system: arcs run counter-clockwise, red marks cyclic dependencies.

Fix structural problems with minimal effort

Finding a tangle is only half the job. The break-up computer identifies the smallest set of dependencies you need to cut to untangle a cyclic group, and virtual refactorings let you simulate the change before you touch the code.

  • In the example below, cutting 10 of 43 edges breaks a cycle of 13 packages; that is 4% of the dependencies involved
  • Fine-tune the proposed set according to your architectural requirements
  • Delete, move or rename elements virtually, see the effect on architecture and structure, then execute the refactorings in your IDE
Sonargraph cycle view with the break-up computer proposing which dependencies to remove
Cycle view with the break-up computer: the proposed cuts and what each one removes.
More capabilities

Also in the box

Hundreds of metrics

Size, complexity, coupling and structure metrics, including advanced ones like LCOM4 and our Maintainability Level, for every element from the system down to a single method.

Quality gates and baselines

Compare against a previous version to see exactly what changed, and configure quality gates that break the build when things got worse compared to the baseline.

Duplicate code detection

Find duplicated code blocks across the whole system and inspect them side by side in the duplicate code viewer.

Your own checks

A Groovy based scripting engine gives you full access to the model, so you can create your own metrics and code checkers, for example flagging uses of subclasses from their super classes.

Git history mining

Change frequency and code churn derived from your Git history identify the stable and unstable parts of your code base, visualized as 2D and 3D tree maps. If you have read "Your Code as a Crime Scene", most of its analyses are supported.

Manage issues

All detected issues are listed in the issues view, where they can be filtered, ignored or converted into tasks. Ignoring is useful for anything you do not plan to fix in the near future.

Get started

Ready to try it on your code?

Evaluations are free and without obligation. Create an account or log in to download our products and request evaluation licenses.