Problem
87 files in the project had InvalidPackageDeclaration warnings. The issue was that the project uses a flattened package structure where files are placed in directories that don't match their package declarations.
Example
| File Location |
Package Declaration |
src/main/kotlin/di/BotModule.kt |
es.wokis.di |
src/main/kotlin/exceptions/BotException.kt |
es.wokis.exceptions |
Solution
Disabled the rule in detekt.yml:
naming:
active: true
InvalidPackageDeclaration:
active: false
Priority
Low - This is a code organization preference, not a bug. The project has always used a flattened structure.
Problem
87 files in the project had
InvalidPackageDeclarationwarnings. The issue was that the project uses a flattened package structure where files are placed in directories that don't match their package declarations.Example
src/main/kotlin/di/BotModule.ktes.wokis.disrc/main/kotlin/exceptions/BotException.ktes.wokis.exceptionsSolution
Disabled the rule in
detekt.yml:Priority
Low - This is a code organization preference, not a bug. The project has always used a flattened structure.