Fix #4140: Allow Bazel based tests to run with string test input#4170
Fix #4140: Allow Bazel based tests to run with string test input#4170picklebento merged 1 commit intodetekt:mainfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4170 +/- ##
=========================================
Coverage 83.44% 83.44%
Complexity 3191 3191
=========================================
Files 465 465
Lines 9119 9119
Branches 1779 1779
=========================================
Hits 7609 7609
Misses 572 572
Partials 938 938 Continue to review full report at Codecov.
|
|
Is the Windows build flaky? I have a hard time seeing that it could relate to my patch. |
|
It is. Don't worry about it. |
|
@chao2zhang Thanks for the review! I'm don't have write access to merge it, could you please? |
|
Usually, we require 2 reviewers for merging PRs. Since @BraisGabin has already read this PR, I will wait for him to merge. |
|
I suppose that this is OK to merge. It's on the test code and it doesn't break our tests. But I'm worried that in the future someone could revert this change without knowing this was intentional. Would it be possible to create a test so we can avoid the regression? |
|
Adding comments seems sufficient to me. We don't officially support Bazel builds so it is hard to verify in the detekt codebase. |
It does not fix test cases that use resource files from the project, but it's a start at least.
15b8d45 to
fa5f41e
Compare
|
I've added an in-line explanation why this is needed. Yes, ideally there should be a test cases for this. Two options for this is to add a Bazel driven build, or to introduce a special Gradle Test task that only has JARs on the classpath. Not sure if it is worth the maintenance overhead for that. |
It does not fix test cases that use resource files from the project, but it's a start at least.