Is there a way to have the source code generation task put @file:Suppress("ALL")
at the top of each file easily? I want to suppress code smell and formatting rules.
Ended up doing it w/ a custom Gradle task.
Ran into the same problem… any chance you could share the task?
We’re using detekt, so I just added the path of all the generated classes to detekt.globalExcludes
in our custom task, but it can be just done in your build.gradle
w/o a custom task.
detekt {
globalExcludes = "src/main/kotlin/generated/or/whatever/your/path/is"
}
Or something like that.