Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@BraisGabin
Copy link
Member

@BraisGabin BraisGabin commented Mar 27, 2021

This fix #1260

Now that we don't create baselines when we don't need them and we allow empty baselines we can fix this old issue.

  • It adds baseline.xml as default value in our gradle plugin
  • And it make the baseline names of multiplatform a bit more consistents. This is a breacking change but as far as I know this part is experimental so it should not be a big problem.

@BraisGabin BraisGabin force-pushed the fix-1260 branch 2 times, most recently from d49b627 to 060199e Compare March 28, 2021 14:14
Base automatically changed from improve-tests to main March 28, 2021 22:32
@BraisGabin BraisGabin changed the base branch from main to improve-more-tests March 28, 2021 22:47
@chao2zhang
Copy link
Member

Note: I'll remove the "skip" commit before moving this out of Draft

The gradle integration test for multiplatform - iOS is also failing for me locally. We could skip this for local development if we don't have time to figure it out.

@BraisGabin BraisGabin force-pushed the fix-1260 branch 3 times, most recently from 4c00592 to 98ba5fd Compare March 30, 2021 18:09
@BraisGabin BraisGabin marked this pull request as ready for review March 30, 2021 18:09
@BraisGabin BraisGabin force-pushed the improve-more-tests branch 2 times, most recently from 83137c2 to b4421f3 Compare March 30, 2021 18:57
objects.fileCollection().from(DEFAULT_SRC_DIR_JAVA, DEFAULT_SRC_DIR_KOTLIN)

var baseline: File? = null
var baseline: File? = objects.fileProperty().fileValue(File("baseline.xml")).get().asFile
Copy link
Member

Choose a reason for hiding this comment

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

Ideally, we should use something like

    var baseline: RegularFileProperty =
        objects.fileProperty().convention { File("baseline.xml") }

but this is a breaking change.

Copy link
Member Author

Choose a reason for hiding this comment

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

I couldn't make it work with convention but now it works with gradle 5.4

@codecov
Copy link

codecov bot commented Apr 2, 2021

Codecov Report

Merging #3619 (aca4bae) into main (709f879) will decrease coverage by 0.08%.
The diff coverage is 0.00%.

❗ Current head aca4bae differs from pull request most recent head cc747d8. Consider uploading reports for the commit cc747d8 to get more accurate results
Impacted file tree graph

@@             Coverage Diff              @@
##               main    #3619      +/-   ##
============================================
- Coverage     78.12%   78.03%   -0.09%     
  Complexity     2837     2837              
============================================
  Files           467      467              
  Lines          9143     9153      +10     
  Branches       1737     1742       +5     
============================================
  Hits           7143     7143              
- Misses         1058     1068      +10     
  Partials        942      942              
Impacted Files Coverage Δ Complexity Δ
...ab/arturbosch/detekt/extensions/DetektExtension.kt 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
.../arturbosch/detekt/internal/DetektMultiplatform.kt 0.00% <0.00%> (ø) 0.00 <0.00> (ø)

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 709f879...cc747d8. Read the comment docs.

var baseline: File? = null
var baseline: File? = objects.fileProperty()
.run {
if (GradleVersion.current() < GradleVersion.version("6.0")) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Could we move up our gradle compatibility? We are supporting a version from 16/Apr/2019

I think that we could move to 6.0. It was release at 08/Nov/2019.

Copy link
Member

Choose a reason for hiding this comment

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

Agreed. We should be able to update README.md and the website.

Base automatically changed from improve-more-tests to main April 4, 2021 23:14
@chao2zhang chao2zhang merged commit 14d3b5c into main Apr 6, 2021
@chao2zhang chao2zhang deleted the fix-1260 branch April 6, 2021 17:30
@chao2zhang chao2zhang added this to the 1.17.0 milestone Apr 6, 2021
@cortinico cortinico added the notable changes Marker for notable changes in the changelog label May 1, 2021
@remcomokveld
Copy link
Contributor

Given that detekt is not the only static analysis tool that has a baseline, would it make sense to rename the default to detekt-baseline.xml? Especically for someone new on a project it would make it easier to identify what this file is intended for.

@cortinico
Copy link
Member

would it make sense to rename the default to detekt-baseline.xml?

Yup that's a fair point @remcomokveld 👍
We're addressing it here #3745

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

notable changes Marker for notable changes in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gradle plugin should set default value for "baseline" property

5 participants