-
-
Notifications
You must be signed in to change notification settings - Fork 757
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
#7360: Add 'assign' to operatorSet of UnusedImport #7361
#7360: Add 'assign' to operatorSet of UnusedImport #7361
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7361 +/- ##
=========================================
Coverage 84.50% 84.50%
Complexity 4168 4168
=========================================
Files 573 573
Lines 11897 11900 +3
Branches 2461 2462 +1
=========================================
+ Hits 10053 10056 +3
Misses 591 591
Partials 1253 1253 ☔ View full report in Codecov by Sentry. |
🤔 sorry, but I can't find |
@BraisGabin this seems to be some gradle specific stuff. I read this article about it https://blog.gradle.org/simpler-kotlin-dsl-property-assignment and then verified it by the test |
Yes it's Gradle specific and implemented as a compiler plugin applied by Gradle when it compiles scripts. Kotlin offers the extension point to customise behaviour of the assign operator (and possibly others though I'm not sure). Given this is Gradle specific, and in line with our general philosophy of not building library or tool-specific config as defaults, I think it would be better to introduce a config option for |
Thanks @3flex for the clarification |
detekt-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/UnusedImport.kt
Outdated
Show resolved
Hide resolved
Co-authored-by: Nicola Corti <corti.nico@gmail.com>
Sorry I didn't check this more closely - in my earlier comment I meant that the I'll open a new issue. |
This PR adds
assign
to theoperatorSet
of the UnusedImport rule so that kotlin-dsl assignments are not reporting unused imports.Resolves #7360