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

Run Gradle 5 tests only for JDK versions < 13 #2143

Merged
merged 2 commits into from Nov 30, 2019
Merged

Run Gradle 5 tests only for JDK versions < 13 #2143

merged 2 commits into from Nov 30, 2019

Conversation

schalkms
Copy link
Member

No description provided.

@codecov-io
Copy link

codecov-io commented Nov 28, 2019

Codecov Report

Merging #2143 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2143      +/-   ##
============================================
+ Coverage      80.5%   80.52%   +0.02%     
  Complexity     2017     2017              
============================================
  Files           336      336              
  Lines          5801     5808       +7     
  Branches       1063     1063              
============================================
+ Hits           4670     4677       +7     
  Misses          564      564              
  Partials        567      567
Impacted Files Coverage Δ Complexity Δ
...ch/detekt/api/internal/ValidatableConfiguration.kt 88.57% <0%> (+2.85%) 0% <0%> (ø) ⬇️

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 d6848af...7a3ba5a. Read the comment docs.

versions.add("5.0")
}
versions.add("6.0.1")
return versions
Copy link
Member

Choose a reason for hiding this comment

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

return if (jdkVersion < 13) {
  listOf("5.0", "6.0.1")
} else {
  listOf("6.0.1")
}

I think that it's easier to know which versions are going to be tested like this. You could even create two consts: GRADLE_5 and GRADLE_6. But I think that the strings helps more to the readability than the constants to the maintanability.

Copy link
Member

Choose a reason for hiding this comment

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

Agree here in terms of readability:

private fun getGradleVersionsUnderTest() =
    if (jdkVersion() < 13) {
        listOf("5.0", "6.0.1")
    } else {
        listOf("6.0.1")
    }

@schalkms schalkms merged commit d6ceb59 into detekt:master Nov 30, 2019
@schalkms schalkms deleted the gradle-version-test branch November 30, 2019 21:48
smyachenkov pushed a commit to smyachenkov/detekt that referenced this pull request Dec 9, 2019
* Run Gradle 5 tests only for JDK versions < 13

* Refactor GetGradleVersion logic for test
smyachenkov pushed a commit to smyachenkov/detekt that referenced this pull request Dec 9, 2019
* Run Gradle 5 tests only for JDK versions < 13

* Refactor GetGradleVersion logic for test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants