Skip to content

Prepare Detekt 1.16.0-RC2#3485

Merged
cortinico merged 2 commits into
detekt:masterfrom
cortinico:nc/prepare-1.16.0-rc2
Feb 24, 2021
Merged

Prepare Detekt 1.16.0-RC2#3485
cortinico merged 2 commits into
detekt:masterfrom
cortinico:nc/prepare-1.16.0-rc2

Conversation

@cortinico

Copy link
Copy Markdown
Member

Time to bake a new RC 🎉
This will hopefully be the last one before we release 1.16.0 stable.

@cortinico cortinico added the housekeeping Marker for housekeeping tasks and refactorings label Feb 19, 2021
@cortinico cortinico added this to the 1.16.0 milestone Feb 19, 2021
@codecov

codecov Bot commented Feb 24, 2021

Copy link
Copy Markdown

Codecov Report

Merging #3485 (1f6086e) into master (b485435) will decrease coverage by 0.33%.
The diff coverage is 83.68%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3485      +/-   ##
============================================
- Coverage     80.07%   79.74%   -0.34%     
- Complexity     2835     2864      +29     
============================================
  Files           456      459       +3     
  Lines          8511     8643     +132     
  Branches       1644     1674      +30     
============================================
+ Hits           6815     6892      +77     
- Misses          793      841      +48     
- Partials        903      910       +7     
Impacted Files Coverage Δ Complexity Δ
...kt/rules/documentation/AbsentOrWrongFileLicense.kt 87.50% <50.00%> (-5.36%) 12.00 <7.00> (+4.00) ⬇️
...gitlab/arturbosch/detekt/rules/style/UseOrEmpty.kt 76.08% <76.08%> (ø) 13.00 <13.00> (?)
.../arturbosch/detekt/rules/naming/NoNameShadowing.kt 84.00% <84.00%> (ø) 16.00 <16.00> (?)
...ules/documentation/LicenceHeaderLoaderExtension.kt 80.95% <86.66%> (+9.07%) 6.00 <0.00> (ø)
.../arturbosch/detekt/internal/DetektMultiplatform.kt 90.90% <90.90%> (ø) 3.00 <3.00> (?)
...kotlin/io/gitlab/arturbosch/detekt/DetektPlugin.kt 82.22% <100.00%> (+1.26%) 10.00 <1.00> (+1.00)
...b/arturbosch/detekt/rules/naming/NamingProvider.kt 100.00% <100.00%> (ø) 3.00 <0.00> (ø)
...rturbosch/detekt/rules/style/StyleGuideProvider.kt 100.00% <100.00%> (ø) 3.00 <0.00> (ø)
...gitlab/arturbosch/detekt/internal/DetektAndroid.kt 0.00% <0.00%> (-71.88%) 0.00% <0.00%> (-12.00%)
.../io/gitlab/arturbosch/detekt/internal/DetektJvm.kt 0.00% <0.00%> (-59.26%) 0.00% <0.00%> (-5.00%)
... and 9 more

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 b485435...ec83fe9. Read the comment docs.

@picklebento

Copy link
Copy Markdown
Member

Should we merge this asap?

We probably also need to revert https://github.com/detekt/detekt/commit/7cd69d21ed13f3109254100532509790db33e320 since I merged that PR in before finding out about RC2 release.

@cortinico

Copy link
Copy Markdown
Member Author

Should we merge this asap?

This has broken tests. I still haven't managed to investigate why.

We probably also need to revert https://github.com/detekt/detekt/commit/7cd69d21ed13f3109254100532509790db33e320 since I merged that PR in before finding out about RC2 release.

I don't think it's a major problem. We could still bake a RC3 after this.

@picklebento

Copy link
Copy Markdown
Member

Another problem I found is that the default-detekt-config.yml inside https://search.maven.org/artifact/io.gitlab.arturbosch.detekt/detekt-core/1.16.0-RC2/jaris still referring to the rules in RC1.

@picklebento

Copy link
Copy Markdown
Member

@cortinico I have a fix. We need to fix the int tests after #3450. I will also look into why gradle testkit tests are not picking up the latest code (i assume it is mavenLocal() that may have an impact)

diff --git a/detekt-gradle-plugin/src/intTest/kotlin/io/gitlab/arturbosch/detekt/CreateBaselineTaskDslTest.kt b/detekt-gradle-plugin/src/intTest/kotlin/io/gitlab/arturbosch/detekt/CreateBaselineTaskDslTest.kt
index 8fd648d30..39ada1f06 100644
--- a/detekt-gradle-plugin/src/intTest/kotlin/io/gitlab/arturbosch/detekt/CreateBaselineTaskDslTest.kt
+++ b/detekt-gradle-plugin/src/intTest/kotlin/io/gitlab/arturbosch/detekt/CreateBaselineTaskDslTest.kt
@@ -1,6 +1,7 @@
 package io.gitlab.arturbosch.detekt
 
 import io.gitlab.arturbosch.detekt.testkit.DslTestBuilder
+import io.gitlab.arturbosch.detekt.testkit.ProjectLayout
 import org.assertj.core.api.Assertions.assertThat
 import org.gradle.testkit.runner.TaskOutcome
 import org.spekframework.spek2.Spek
@@ -14,9 +15,17 @@ internal class CreateBaselineTaskDslTest : Spek({
                     val detektConfig = """
                         |detekt {
                         |   baseline = file("build/baseline.xml")
+                        |   buildUponDefaultConfig = true
                         |}
                         """
+
+                    val projectLayout = ProjectLayout(
+                        numberOfSourceFilesInRootPerSourceDir = 15,
+                        numberOfCodeSmellsInRootPerSourceDir = 15
+                    )
+
                     val gradleRunner = builder
+                        .withProjectLayout(projectLayout)
                         .withDetektConfig(detektConfig)
                         .build()
 
diff --git a/detekt-gradle-plugin/src/intTest/kotlin/io/gitlab/arturbosch/detekt/testkit/DslGradleRunner.kt b/detekt-gradle-plugin/src/intTest/kotlin/io/gitlab/arturbosch/detekt/testkit/DslGradleRunner.kt
index 63bb874ba..9313d8648 100644
--- a/detekt-gradle-plugin/src/intTest/kotlin/io/gitlab/arturbosch/detekt/testkit/DslGradleRunner.kt
+++ b/detekt-gradle-plugin/src/intTest/kotlin/io/gitlab/arturbosch/detekt/testkit/DslGradleRunner.kt
@@ -17,7 +17,9 @@ class DslGradleRunner @Suppress("LongParameterList") constructor(
     val dryRun: Boolean = false
 ) {
 
-    private val rootDir: File = Files.createTempDirectory("applyPlugin").toFile().apply { deleteOnExit() }
+    private val rootDir: File = Files.createTempDirectory("applyPlugin")
+        .toFile()
+        .apply { deleteOnExit() } // Comment out when debugging Gradle testkit tests.
     private val randomString = UUID.randomUUID().toString()
 
     private val settingsContent = """

@cortinico

Copy link
Copy Markdown
Member Author

Another problem I found is that the default-detekt-config.yml inside https://search.maven.org/artifact/io.gitlab.arturbosch.detekt/detekt-core/1.16.0-RC2/jaris still referring to the rules in RC1.

Let's tackle this as a separate problem. I also believe this requires an RC3 before we can fully release a 1.16.0.

@cortinico I have a fix.

Thanks for that. I've actually applied a different fix that relies on creating a Baseline file. Given that we have a testing API for that, let's use it :)

We need to fix the int tests after #3450. I will also look into why gradle testkit tests are not picking up the latest code (i assume it is mavenLocal() that may have an impact)

Yeah that's annoying. Specifically as we notice those failures only once we publish a new version

@cortinico
cortinico merged commit f534a75 into detekt:master Feb 24, 2021
@cortinico
cortinico deleted the nc/prepare-1.16.0-rc2 branch February 24, 2021 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

housekeeping Marker for housekeeping tasks and refactorings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants