-
-
Notifications
You must be signed in to change notification settings - Fork 822
Gradle - set a default value for baseline #3619
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
Conversation
d49b627 to
060199e
Compare
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. |
e875964 to
9bc7df0
Compare
4c00592 to
98ba5fd
Compare
83137c2 to
b4421f3
Compare
| 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
detekt-gradle-plugin/src/test/kotlin/io/gitlab/arturbosch/detekt/DetektAndroidTest.kt
Outdated
Show resolved
Hide resolved
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
| var baseline: File? = null | ||
| var baseline: File? = objects.fileProperty() | ||
| .run { | ||
| if (GradleVersion.current() < GradleVersion.version("6.0")) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
b4421f3 to
5106c78
Compare
|
Given that detekt is not the only static analysis tool that has a baseline, would it make sense to rename the default to |
Yup that's a fair point @remcomokveld 👍 |
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.
baseline.xmlas default value in our gradle plugin