-
-
Notifications
You must be signed in to change notification settings - Fork 767
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
Set DetektJvm task source with SourceDirectorySet instead of file list #4151
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4151 +/- ##
============================================
- Coverage 83.45% 83.44% -0.01%
+ Complexity 3185 3177 -8
============================================
Files 463 465 +2
Lines 9095 9104 +9
Branches 1768 1775 +7
============================================
+ Hits 7590 7597 +7
- Misses 571 572 +1
- Partials 934 935 +1
Continue to review full report at Codecov.
|
I guess |
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 unit test this somehow?
I believe that's exactly the case. But this still feels like a best guess fix. Are we able to verify it somehow (unit or manual testing)? |
In my opinion, this fix should be in 1.19.0 - @3flex Would you have time to verify this in a repro project? I can help if you don't have time. |
I tested manually before submitting the PR. I'm working on adding some functional tests for the Gradle plugin but I'm finding odd issues with TestKit so it will take a bit more time to add an automated test. If anyone wants to verify manually that might be enough to get it over the line... |
I didn't check that the excludes work. But I tested it in my project and it doesn't introduce any regression as far as I can see. |
Fixes #4127
Unfortunately I can't say definitively why this fixes the problem, but I suspect it's somewhat related to this: gradle/gradle#3417 (comment)
Passing
kotlinSourceSet.kotlin.files
passed a list of files to use as the source for the task, whilekotlinSourceSet.kotlin
passes aSourceDirectorySet
, so it's possible the filtering based on regex described in the comment I linked won't apply when a full file path is provided, but works when the source directory set is passed in instead.