https://kotlinlang.org logo
#detekt
Title
# detekt
x

xenomachina

09/12/2019, 12:37 AM
Is there a way to use detekt to find unused
internal
(rather than
private
) properties?
m

Mike

09/12/2019, 1:38 PM
Detekt only analyzes a file, and not the project as a whole. You need something with project knowledge like IntelliJ or Sonarqube (although I'm not sure if either of those does that level of detection yet). IntelliJ is the most likely to have something like that implemented in its analysis.
x

xenomachina

09/12/2019, 5:03 PM
@Mike Ah, good to know about detekt's file at a time limitation. Thanks! I was hoping to set up this sort of detection in my gradle builds (ideally), or at least something that could be run in continuous integration.
m

Mike

09/12/2019, 5:26 PM
I believe there's a way to use IntelliJ's analysis in CI, although I have not done it myself. https://www.jetbrains.com/help/idea/command-line-code-inspector.html Although I think IntelliJ needs to be installed to do this, so not practical for CI/CD servers.
16 Views