Hi! I have a multi-module gradle project, which ha...
# detekt
g
Hi! I have a multi-module gradle project, which has a Sonar intergration, and I wish to use Detekt metrics inside Sonar. Here is my root gradle build file sonar entry. I have setup sources and test for all the subprojects.
Copy code
property("sonar.sources", "src/main")
      property("sonar.tests", "src/test")
But when I run 
gradle sonarqube
 task, I keep getting errors like:
Copy code
No input file found for /Users/gopala.akshintala/code-clones/my-github/vader-root/vader/build/generated/sources/delombok/java/main/org/revcloud/vader/runner/Utils.kt. No detekt issues will be imported on this file.
 And I don’t see any detekt related errors. Note: I am using lombok for some modules, so I even tried this:
Copy code
property(
        "sonar.sources",
        the<SourceSetContainer>()["main"].allJava.srcDirs.filter { it.exists() }.joinToString(",")
      )
      property(
        "sonar.tests",
        the<SourceSetContainer>()["test"].allJava.srcDirs.filter { it.exists() }.joinToString(",")
      )
but I keep getting the same error with file path being different (pointing to generated, so I guess this is not lombok specific)
Copy code
No input file found for /Users/gopala.akshintala/code-clones/my-github/vader-root/vader/build/generated/sources/delombok/java/main/org/revcloud/vader/runner/Utils.kt. No detekt issues will be imported on this file.
Please help!
g
I have little experience with Sonar 😞
g
😞
g
If you open an issue on the sonar-detekt repo you might get more responses
g
Sure.. thanks @gammax!
169 Views