Anyone use detekt and SQLDelight? Seems like detek...
# squarelibraries
c
Anyone use detekt and SQLDelight? Seems like detekt is running on generated files, strangely.
e
You have to exclude them. I'll get the magic incantation from one of my projects
Copy code
tasks.withType(Detekt::class.java).configureEach {
    val projectDir = projectDir
    val buildDir = project.layout.buildDirectory.asFile.get()

    exclude {
      it.file.relativeTo(projectDir).startsWith(buildDir.relativeTo(projectDir))
    }
  }
}
c
Weird that it's only sqldelight generated code that is being scanned though. my other generated code isn't.
e
It might depend on how the source set is added by the plug-in
c
Yeah, looks like a bug on SQLDelight. should probably reopen it... @Derek Ellis? https://github.com/cashapp/sqldelight/issues/4157