-
-
Notifications
You must be signed in to change notification settings - Fork 795
Fix regression generating configuration #4646
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
Codecov Report
@@ Coverage Diff @@
## main #4646 +/- ##
===========================================
+ Coverage 0 84.53% +84.53%
- Complexity 0 3364 +3364
===========================================
Files 0 482 +482
Lines 0 11211 +11211
Branches 0 2044 +2044
===========================================
+ Hits 0 9477 +9477
- Misses 0 698 +698
- Partials 0 1036 +1036
Continue to review full report at Codecov.
|
public final fun load (Lio/github/detekt/tooling/api/spec/ProcessingSpec;Ljava/lang/ClassLoader;)Lio/github/detekt/tooling/api/DefaultConfigurationProvider; | ||
public static synthetic fun load$default (Lio/github/detekt/tooling/api/DefaultConfigurationProvider$Companion;Lio/github/detekt/tooling/api/spec/ProcessingSpec;Ljava/lang/ClassLoader;ILjava/lang/Object;)Lio/github/detekt/tooling/api/DefaultConfigurationProvider; | ||
public final fun load (Lio/github/detekt/tooling/api/spec/ExtensionsSpec;Ljava/lang/ClassLoader;)Lio/github/detekt/tooling/api/DefaultConfigurationProvider; | ||
public static synthetic fun load$default (Lio/github/detekt/tooling/api/DefaultConfigurationProvider$Companion;Lio/github/detekt/tooling/api/spec/ExtensionsSpec;Ljava/lang/ClassLoader;ILjava/lang/Object;)Lio/github/detekt/tooling/api/DefaultConfigurationProvider; |
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.
This functions were introduced in 1.20 so it's safe to change them.
Could you provide some tests + more context on what this change is doing (it's not immediate from reading the code). |
ddd6ade#diff-ea3a27e29a40bcb62f6014e51bfdf793236b1ed156b98170570086a1cff78415 this is the unit test that I added to reproduce the issue. The test wasn't testing the real state. The real state is that the file doesn't exist and that all works. That case was failing before and know it works. All the fix is in this commit: ddd6ade the other commits are just refactors to make this change easier. I don't know how to add more tests because the tests are already there. About context. The issue was this line of code that I added in #4315: detekt/detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/runners/ConfigExporter.kt Line 16 in 481b3b2
The problem is that |
Thanks for the explanation. IMHO this can be merged 👍 |
This is not my nicest job for sure. But now it works and we have a test to ensure that it doesn't break again.
To fix this properly we need to do a huge refactor on the core.
fix #4601