diktat icon indicating copy to clipboard operation
diktat copied to clipboard

Bug in UNUSED_IMPORT

Open Cheshiriks opened this issue 4 years ago • 5 comments

Sometimes the warning UNUSED_IMPORT doesn't fire

Cheshiriks avatar Aug 11 '21 13:08 Cheshiriks

Please add more information/context/links to discussion/examples...

petertrr avatar Aug 13 '21 08:08 petertrr

Useless issue

orchestr7 avatar Jan 26 '22 09:01 orchestr7

org.cqfn.diktat.util.SuppressingTest.kt Diktat ignores unused imports and throws no warnings

Cheshiriks avatar Jun 02 '22 12:06 Cheshiriks

Need a real use case

nulls avatar Sep 20 '23 09:09 nulls

  1. Diktat doesn't remove imports with stars: import bla.bla.*
  2. https://github.com/saveourtool/save-cloud/blob/53e505e3d8c7e02adf3c611b88927ab6eae5c073/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/components/views/vuln/VulnerabilityTagsComponent.kt:
import com.saveourtool.save.frontend.utils.*
import com.saveourtool.save.frontend.utils.noopResponseHandler
  1. Diktat doesn't detekt imports for function extensions: https://github.com/saveourtool/save-cloud/blob/53e505e3d8c7e02adf3c611b88927ab6eae5c073/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/utils/RequestUtils.kt
import kotlinx.serialization.decodeFromString

nulls avatar Sep 20 '23 10:09 nulls