Circular dependencies occur when two classes reference each other, either directly or indirectly. This means that the classes' dependency structure
does not represent an intuitive hierarchy, which makes it harder to understand and maintain.
What is the potential impact?
Circular dependencies increase the architectural complexity of the code, reducing its readability, extensibility, and maintainability. As the
project grows, circular dependencies often lead to more circular dependencies, further complication of the architecture and increasing technical debt.
Over time, untangling these dependencies becomes increasingly difficult.
Exceptions
Circular dependencies between an inner class and its outer class, or between inner classes within the same enclosing class, are not flagged as
issues.