Skip to content

Detekt CLI Type Resolution - How to get the classpath #6550

Answered by cortinico
gilgoldzweig asked this question in Q&A
Discussion options

You must be logged in to vote

The whole point of using Detekt Gradle Plugin is so you don't have to create the classpath manually.

In a sense, it's like if you where to ask how you can use the javac command to compile the MainActivity.java file, I don't believe that https://developer.android.com/ tells you how to do it.

To answer your questions I would do the following:

  1. Clone the detekt repo
  2. Edit the detekt-gradle-plugin to print the classpath on console. It should be a colon separated list of jars/folders.
  3. Use it in your invocation of detekt CLI

Also I don't think we should update the docs to suggest this

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by cortinico
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants