Problem:
There is a bug in Detekt that prevents configurations like yours from working: the excludes
path filters are not evaluated if includes
are present. The fix has just been implemented and is currently in the 1.23.0 milestone. Let's hope for a release soon. Unfortunately, the logic seems to have been in place for years so reverting to a previous release is probably not an option.
Workaround:
While we wait for that fix, consider implicitly excluding samples/
by explicitly including all other direct subfolders and files within compose/
. For example:
UndocumentedPublicClass:
active: true
includes: &composeComponentNotSamples
- '**/rd/compose/folderA/**'
- '**/rd/compose/folderB/**'
- '**/rd/compose/fileC.kt'
- '**/rd/compose/fileD.kt'
UndocumentedPublicFunction:
active: true
includes: *composeComponentNotSamples
OutdatedDocumentation:
active: true
includes: *composeComponentNotSamples
allowParamOnConstructorProperties: true
This should do the trick but should only be considered as a temporary solution because it would require manual effort to update that list as you add, rename, or remove files & folders.