Replies: 2 comments
-
Please ask this question in gradle community that supports gradle plugin. |
Beta Was this translation helpful? Give feedback.
-
Since Checkstyle is a “coding style” tool, it checks code written by developers for quality concerns and style. This includes things like indentation, class design, and more. Once a source file is compiled into a class file, most of this information is lost, and you would need to decompile the compiled byte code to make it parsable again.
Yes, you can simply point Checkstyle to where your generated code lives. Note that these will still be .java files, not .class files.
For some checks, this might make sense, but for others like indentation, comments, etc, it might not. Checkstyle does not care if your .java files are generated or not. |
Beta Was this translation helpful? Give feedback.
-
Is there any way to analyze generated source files for checkstyle ? Because it should analyze the generated code rather than java files.
tried the following in build.gradle but no effect
apply plugin: 'checkstyle'
checkstyleMain
{
source 'build/classes/**'
}
also tried this
checkstyleMain
{
source("$buildDir/classes/")
exclude("/*.java")
include("$buildDir/classes/java/main/**")
}
Beta Was this translation helpful? Give feedback.
All reactions