Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
PackageDeclaration: new property matchDirectoryStructure to match the package name to directory name of source file #3437
The PackageDeclaration check should allow you to check whether the package name matches the directory name for the source file as stated in the documentation.
Maven compiles classes with non-matching package name just fine and I would like to prevent having such classes. After searching for this feature, I found out it was removed (#209). I think this change should be reverted, since the Java language specification doesn't force files to be in a certain directory.
In addition to the logic change, we should have some example of new option in our xdoc. We should enable this option by default in our own configuration.