Skip to content

Instantly share code, notes, and snippets.

@root-ansh
Created March 11, 2022 19:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save root-ansh/00cd6bc29b1dedb726ff539c3c744397 to your computer and use it in GitHub Desktop.
Save root-ansh/00cd6bc29b1dedb726ff539c3c744397 to your computer and use it in GitHub Desktop.
apply plugin: "io.gitlab.arturbosch.detekt" // detekt STEP1 applying plugin (detekt = kotlin code's static analyser)
apply plugin: "checkstyle" // checkstyle STEP1 applying plugin (checkstyle = java code's static analyser)
// detekt STEP2 plugin configuration
detekt {
parallel = true
allRules = true
ignoreFailures = true
debug = true
}
// detekt STEP3 gradle task configuration
tasks.named("detekt").configure {
reports {
html.required.set(true)
sarif.required.set(false)
xml.required.set(false)
txt.required.set(false)
}
}
// checkstyle STEP2 plugin configuration
checkstyle {
ignoreFailures false
showViolations true
toolVersion = "7.8.1"
}
// checkstyle STEP3 gradle task configuration
task Checkstyle(type: Checkstyle) {
source 'src/main/java'
ignoreFailures true
showViolations true
include '**/*.java'
classpath = files()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment