Description
A rules-based linter that enforces modularization standards and prevents "architecture rot" in large-scale multi-module projects.
Problem Statement
In large monorepos, module boundaries often blur over time. Developers might accidentally introduce circular dependencies, or "core" modules might start depending on "feature" or "ui" modules, breaking the dependency hierarchy. Without automated enforcement, modularization health declines, leading to slower builds and fragile code.
Proposed Solution
A verification task (windsLinter) that checks the project structure against a set of user-defined architectural rules and fails the build if violations are detected.
Configurable Rules
- Layer Violations: Prevent specific modules (e.g.,
:core) from depending on others (e.g., :ui) using a simple DSL.
- Dependency Thresholds: Flag modules with more than X dependencies (high complexity) or those that are depended upon by too many others (high impact/risk).
- Public API Leakage: Ensure "internal" modules aren't being exposed in the public API of a library, preventing "transitively leaked" internal dependencies.
- Metadata Coverage: Enforce that all publishable modules have complete
moduleMetadata (name, description, licenses, persons).
Configuration Example
winds {
architecture {
rules {
denyDependency(from = ":core", to = ":ui")
maxDependencies(10)
requireMetadata = true
strictPublicApi = true
}
}
}
Implementation Details
- Integration with the Gradle Dependency Graph to perform real-time path analysis.
- Custom report generation (Console + HTML) for CI/CD feedback.
- Automatic integration into the
windsCheck quality gate.
Description
A rules-based linter that enforces modularization standards and prevents "architecture rot" in large-scale multi-module projects.
Problem Statement
In large monorepos, module boundaries often blur over time. Developers might accidentally introduce circular dependencies, or "core" modules might start depending on "feature" or "ui" modules, breaking the dependency hierarchy. Without automated enforcement, modularization health declines, leading to slower builds and fragile code.
Proposed Solution
A verification task (
windsLinter) that checks the project structure against a set of user-defined architectural rules and fails the build if violations are detected.Configurable Rules
:core) from depending on others (e.g.,:ui) using a simple DSL.moduleMetadata(name, description, licenses, persons).Configuration Example
winds { architecture { rules { denyDependency(from = ":core", to = ":ui") maxDependencies(10) requireMetadata = true strictPublicApi = true } } }Implementation Details
windsCheckquality gate.