I set detekt.sonar.kotlin.config.path to config/detekt/detekt.yml, which works during analysis of app, module1 and module2, but fails for root project - I get an error: Configuration does not exist: <path-to-projects>\config\detekt\detekt.yml which is one directory above my project.
When analysing gradle project with submodules analysis fails for root project - the config file is being looked in a directory above project.
My project structure is:
I set
detekt.sonar.kotlin.config.path
toconfig/detekt/detekt.yml
, which works during analysis of app, module1 and module2, but fails for root project - I get an error:Configuration does not exist: <path-to-projects>\config\detekt\detekt.yml
which is one directory above my project.The logic in https://github.com/detekt/sonar-detekt/blob/cdb5924d02e38960c6cd58e4dca3235476f140d8/src/main/kotlin/io/gitlab/arturbosch/detekt/sonar/sensor/DetektConfiguration.kt#L95 and https://github.com/detekt/sonar-detekt/blob/cdb5924d02e38960c6cd58e4dca3235476f140d8/src/main/kotlin/io/gitlab/arturbosch/detekt/sonar/sensor/DetektConfiguration.kt#L98 seems wrong - if file does not exist or ends in .yml/.yaml resolve it in another directory, skipping valid existing files.