Hi, I'm trying to find a way in IntelliJ to verify package structure of a project. Let's say that my project contains following packages
src/common
src/module/featureA
src/module/featureB
src/module/featureC
I want to avoid any dependencies between code located in feature packages. So if I remove featureA the project should still compile. If I find any functionality which is common for two or more features I move it to common package.
What I want to get is to be able to verify if:
- there are no dependencies between classes in separate features
- there are no dependencies from common to features
- there are at least two dependencies from features to common
Can this be easily done by any of Analyze functions of IntelliJ. Or, maybe this check could be done using checktyle rules?