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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare Detekt 1.16.0-RC2 #3485

Merged
merged 2 commits into from
Feb 24, 2021
Merged

Conversation

cortinico
Copy link
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
Copy link

codecov bot commented Feb 24, 2021

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.

@chao2zhang
Copy link
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
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.

@chao2zhang
Copy link
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.

@chao2zhang
Copy link
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
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.

None yet

4 participants