sonar-detekt icon indicating copy to clipboard operation
sonar-detekt copied to clipboard

Detekt config outside of the project

Open Tetradeus opened this issue 3 years ago • 3 comments

Hello,

We share our single detekt config file via one of our gradle plugin used for all our projects. The file is then not available in each project structure but in one of their build dependency. Would it be possible to provide this config file through the sonar-kotlin plugin admin ?

Thanks for your help.

Tetradeus avatar Jun 24 '21 07:06 Tetradeus

Hello, Can you please elaborate on what are you trying to achieve? As shown in the linked image, you can specify the detekt config yaml file. What does prevent you to specify the detekt config yaml file here?

schalkms avatar Jul 09 '21 20:07 schalkms

Hi @schalkms, the detekt config file resides in a shared gradle library. It is then not available in the project file tree. Because we only use one config for all of our projects, if it was possible to define it in the admin, it would works for our setup.

Thanks.

Tetradeus avatar Jul 21 '21 10:07 Tetradeus

It is then not available in the project file tree.

But the detekt config file in your shared Gradle library is available on the file system, as far as I understand your use case. Do you know where the config file in your Gradle library resides in order to reference the config file directly? What prevents you from copying this file in your project tree via a Gradle command if you can't reference the detekt config file in your Gradle library?

schalkms avatar Jul 21 '21 10:07 schalkms