Skip to content
This repository was archived by the owner on Jan 6, 2024. It is now read-only.
This repository was archived by the owner on Jan 6, 2024. It is now read-only.

Plugin configuration questions #166

@4rthurRousseau

Description

@4rthurRousseau

Hello team !

My team and I are working on multiple Java / Kotlin Android projects with a mix of Jetpack Compose and traditional Android projects. We recently integrated the sonar-kotlin plugin (version 2.5.0) into our SonarQube and so far, everything is running perfectly, but now that we're trying to meet different requirements on some projects, wer're having questions / issues about the plugin configuration.

Issues with "Non-Detekt" projects :

Some of our Kotlin projects do not use Detekt and we do not plan on integrating it. However, we have been experiencing crashes in these projects since the day we started specifying the Detekt configuration YAML path in the plugin configuration.

FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':sonarqube'.
Configuration does not exist: /home/jenkins/agent/workspace/[REMOVED]/detekt-configuration.yaml

Is there a way to only use the Detekt configuration if it is present in the project, preventing crashes on projects that do not use Detekt ?

Configuration overlapping :

We have specified a path for "detekt.sonar.kotlin.config.path" in the plugin configuration. We are curious about how the rules defined in the YAML file of each project interact with the rules imported during the plugin addition. What is the impact of this setting and how does it work in conjunction with the predefined Detekt rules ?

Modifying rules for specific projects :

Our aim is to keep all the rules configured at the quality profile level, but we would like to modify some rules for certain projects that use Jetpack Compose (https://detekt.dev/docs/introduction/compose/). We noticed that Detekt offers a "--build-upon-default-config" flag which allows us to specify only the rules we wish to modify. Is it possible to "emulate" this behavior using the Sonar-Kotlin plugin ?

Your advice and support would be greatly appreciated. Thanks a lot for your work on Detekt and its Sonar plugin !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions