Skip to content

Conversation

@marschwar
Copy link
Contributor

This closes #3918

Since switching to org.gradle.api.tasks.SourceTask, there is a difference how users would specify the input to be checked using the detekt extension vs. creating a custom task which seemed to have confused users.

detekt {
    input = files(
        "src/main/kotlin",
        "gensrc/main/kotlin"
    )
}

vs.

tasks.register(name: myDetekt, type: io.gitlab.arturbosch.detekt.Detekt) {
   source = files("src/main/kotlin", "src/test/kotlin")
}

@codecov
Copy link

codecov bot commented Jul 12, 2021

Codecov Report

Merging #3951 (be4d00e) into main (d81d6a2) will decrease coverage by 0.13%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #3951      +/-   ##
============================================
- Coverage     83.58%   83.44%   -0.14%     
- Complexity     3123     3149      +26     
============================================
  Files           456      456              
  Lines          9014     9014              
  Branches       1752     1754       +2     
============================================
- Hits           7534     7522      -12     
- Misses          564      565       +1     
- Partials        916      927      +11     
Impacted Files Coverage Δ
...sch/detekt/rules/coroutines/SleepInsteadOfDelay.kt 72.00% <0.00%> (-8.00%) ⬇️
...arturbosch/detekt/generator/collection/KDocTags.kt 62.50% <0.00%> (-5.00%) ⬇️
...h/detekt/rules/style/DataClassContainsFunctions.kt 95.00% <0.00%> (-5.00%) ⬇️
...rturbosch/detekt/rules/bugs/UnnecessarySafeCall.kt 73.91% <0.00%> (-4.35%) ⬇️
...io/github/detekt/report/sarif/SarifOutputReport.kt 90.90% <0.00%> (-3.04%) ⬇️
...rturbosch/detekt/rules/style/UnusedPrivateClass.kt 70.66% <0.00%> (-2.67%) ⬇️
...ekt/generator/collection/DocumentationCollector.kt 85.00% <0.00%> (-2.50%) ⬇️
...t/rules/style/UtilityClassWithPublicConstructor.kt 93.61% <0.00%> (-2.13%) ⬇️
...ain/kotlin/io/gitlab/arturbosch/detekt/cli/Spec.kt 88.23% <0.00%> (-1.97%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d81d6a2...be4d00e. Read the comment docs.

Copy link
Member

@schalkms schalkms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I favor this change compared to the old behavior.

@marschwar marschwar marked this pull request as ready for review July 13, 2021 06:22
@cortinico cortinico added this to the 1.18.0 milestone Jul 18, 2021
@cortinico cortinico added gradle-plugin notable changes Marker for notable changes in the changelog labels Jul 18, 2021
@cortinico
Copy link
Member

Are we ok to merge this?

@BraisGabin BraisGabin merged commit ce7bb32 into detekt:main Jul 24, 2021
@marschwar marschwar deleted the rename-input-to-source branch July 27, 2021 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gradle-plugin notable changes Marker for notable changes in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename input property to source in the DetektExtension of the gradle plugin

4 participants