Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

one report for all platforms (xml) in MPP but each platform overrides it #4035

Closed
robstoll opened this issue Aug 12, 2021 · 7 comments · Fixed by #3687 or #6957
Closed

one report for all platforms (xml) in MPP but each platform overrides it #4035

robstoll opened this issue Aug 12, 2021 · 7 comments · Fixed by #3687 or #6957
Assignees
Labels
bug gradle-plugin never gets stale Mark Issues/PRs that should not be closed as they won't get stale

Comments

@robstoll
Copy link
Contributor

robstoll commented Aug 12, 2021

Expected Behavior

  1. file contains all errors (not just last result of last platform which was run) or there is one file per platform and sourceSet (see workaround in reproduction project)
  2. check also depends per default on the the platform specific detekt tasks (like detekt task does) -- for consistency reasons, I personally wouldn't mind if the behaviour for detekt is changed => looks like a regression, check depended on them in 1.17.1

Observed Behavior

I ran the following tasks:

:detekt SKIPPED
:detektJsMain SKIPPED
:detektJsTest SKIPPED
:detektJvmMain SKIPPED
:compileKotlinJvm SKIPPED
:compileJava SKIPPED
:jvmProcessResources SKIPPED
:jvmMainClasses SKIPPED
:detektJvmTest SKIPPED
:detektMetadataCommonMain SKIPPED
:detektMetadataMain SKIPPED
:allDetekt SKIPPED

side notice: I would have expect that detekt provides an allDetekt itself (like there is allTests for MPP)

  1. detektJvmTest overrides the result from detektJsMain
  2. detektMetadataMain overrides the result from detektJvmTest

Steps to Reproduce

  1. clone https://github.com/robstoll/kbox
  2. checkout branch new-MPP
  3. ./gradlew allDetekt
  4. see workaround in build.gradle.kts line ~150 => the current workaround in master is here: https://github.com/robstoll/kbox/blob/master/build.gradle.kts#L131

Your Environment

  • Version of detekt used: 1.18.0
  • Version of Gradle used (if applicable): 7.1.1
  • Link to your project (if it's a public repository): https://github.com/robstoll/kbox (branch new-MPP or master in case it does not exist any more)
@BraisGabin
Copy link
Member

Maybe this is related with #4044 but I'm not sure.

@cortinico
Copy link
Member

Maybe this is related with #4044 but I'm not sure.

Definitely this. Plus you mentioned a lot of other small issues that I'd like to follow up @robstoll

Intellij fails to import the project when kotlin.mpp.enableGranularSourceSetsMetadata=true is enabled in gradle.properties. Maybe related. Setting this property to false does not fix the problem

So are you saying that you can't import the project at all in IntelliJ if you have Detekt?

side notice: I would have expect that detekt provides an allDetekt itself (like there is allTests for MPP)

This was briefly discussed here #3927 (comment) but never finalized. Maybe you can drop your opinion there? 👍

@robstoll
Copy link
Contributor Author

robstoll commented Aug 17, 2021

So are you saying that you can't import the project at all in IntelliJ if you have Detekt?

It turned out to be an intellij bug (https://youtrack.jetbrains.com/issue/KTIJ-19430) and can thus be ignored.

@robstoll
Copy link
Contributor Author

@3flex I see this should be fixed long time ago. I just updated to 1.22.0 and the point 1 in the description is not fixed yet. If I have an MPP project and violations are found in several targets then each detektXy task overrides the previous one

@BraisGabin BraisGabin reopened this Jan 12, 2023
@github-actions
Copy link

This issue is stale because it has been open 90 days with no activity. Please comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Apr 13, 2023
@3flex 3flex removed the stale label Apr 13, 2023
@3flex 3flex self-assigned this Jun 13, 2023
@detekt-ci
Copy link
Collaborator

This issue is stale because it has been open 90 days with no activity. Please comment or this will be closed in 7 days.

@robstoll
Copy link
Contributor Author

I guess this is still not fixed.

@BraisGabin BraisGabin removed the stale label Sep 12, 2023
@cortinico cortinico added the never gets stale Mark Issues/PRs that should not be closed as they won't get stale label Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug gradle-plugin never gets stale Mark Issues/PRs that should not be closed as they won't get stale
Projects
None yet
5 participants