You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.
Setting /detekt.yaml as configuration path in Sonar/Kotlin/Detekt results in following error:
Provided path '/…/ca4c5a47ac213f623228/modules/detekt.yaml' does not exist
Because tryFindDetektConfigurationFile looks for file in module directory, then if not found looks on directory above which doesn't work if module is nested deeper.
Yeah your right. I forgot to support absolute paths. As sonar treats each module as the root in a Sensor it is hard to find the config file so I wrote about this limitation in the readme.
Do you might to file a PR for this? :)
We have following project structure:
Setting
/detekt.yaml
as configuration path in Sonar/Kotlin/Detekt results in following error:Because
tryFindDetektConfigurationFile
looks for file in module directory, then if not found looks on directory above which doesn't work if module is nested deeper.https://github.com/arturbosch/sonar-kotlin/blob/30125207e3c45142d0f89b2515c8174fd80204a6/src/main/kotlin/io/gitlab/arturbosch/detekt/sonar/sensor/DetektConfiguration.kt#L49-L67
Ideal solution would be to support "absolute" path that starts with
/
and do something like:Where
rootProjectPath
is absolute path to the root of the project.The text was updated successfully, but these errors were encountered: