Is there a way to use detekt to find unused `inter...
# detekt
x
Is there a way to use detekt to find unused
internal
(rather than
private
) properties?
m
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
@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
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.