Skip to content

Detectors Overview

archlint comes with 28+ built-in detectors categorized by the type of architectural or code quality issue they identify.

Dependency Issues

DetectorIDDescriptionDefault
Cyclic DependenciescyclesCircular dependencies between files
Type Cyclescircular_type_depsType-only circular dependencies
Package Cyclespackage_cyclesCyclic dependencies between packages
Layer Violationlayer_violationViolations of defined architectural layers
SDP Violationsdp_violationStable Dependencies Principle violations

Module & Class Design

DetectorIDDescriptionDefault
God Modulegod_moduleModules with too many responsibilities
Hub Modulehub_moduleHighly connected "hub" modules
Low CohesionlcomClasses with low internal cohesion (LCOM4)
High Couplinghigh_couplingModules with too many dependencies
Scattered Modulemodule_cohesionFunctionality scattered across too many files
Feature Envyfeature_envyMethods that use more of another class than their own

Code Quality & Organization

DetectorIDDescriptionDefault
Dead Codedead_codeUnused exports
Dead Symbolsdead_symbolsUnused local functions and variables
Orphan Typesorphan_typesTypes not connected to the codebase
Barrel Abusebarrel_fileLarge barrel files causing coupling
Primitive Obsessionprimitive_obsessionOveruse of primitives instead of domain types

Complexity & Size

DetectorIDDescriptionDefault
High ComplexitycomplexityFunctions with high cyclomatic complexity
Deep Nestingdeep_nestingDeeply nested code blocks
Long Parameterslong_paramsFunctions with too many parameters
Large Filelarge_fileSource files that are too large

Change Patterns

DetectorIDDescriptionDefault
Shotgun Surgeryshotgun_surgeryChanges requiring modification in many files
Unstable Interfaceunstable_interfaceFrequently changing public interfaces

Runtime & Safety

DetectorIDDescriptionDefault
Test Leakagetest_leakageTest code leaking into production
Vendor Couplingvendor_couplingTight coupling to external libraries
Hub Dependencyhub_dependencyOver-reliance on external packages
Side Effect Importside_effect_importImports that trigger side effects
Shared Mutable Stateshared_stateExported mutable variables

Architectural Metrics

DetectorIDDescriptionDefault
Abstractness ViolationabstractnessPain/Useless zones (I+A metric)
Scattered Configscattered_configConfiguration spread across many files
Code Clonecode_cloneDuplicated code across the project

Released under the MIT License.