Ndepend Java ★
The ability to write custom queries in CQLinq, visualize dependencies, and track evolution over time transforms code quality from a vague aspiration into a measurable, enforceable practice. While the Java ecosystem has many fine linters and bug finders, NDepend brings architectural governance—something typically found only in high-end commercial tools or in-house frameworks.
// <Name>Abstract types with zero derived types</Name> from t in Types where t.IsAbstract && t.NbDerivedTypes == 0 select new t, t.NbDerivedTypes This finds "abstract classes that no one extends"—often a sign of dead code or misuse of abstraction. ndepend java
// Warn if any class in persistence uses a raw SQL string from m in Methods where m.ParentNamespace.Name.Contains("persistence") && m.CodeString.Contains("executeQuery") select m Save it. It now runs with every analysis. Export the .ndproj to your repository. In your CI script, run: The ability to write custom queries in CQLinq,