Skip to content

Commit

Permalink
Checkstyle with checkstyle 9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dmikurube committed Feb 12, 2025
1 parent 3185494 commit 83a29fe
Show file tree
Hide file tree
Showing 18 changed files with 1,027 additions and 696 deletions.
32 changes: 16 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -223,31 +223,31 @@ gemPush {
}

test {
jvmArgs '-XX:MaxPermSize=128M', '-Xmx2048m'
jvmArgs "-XX:MaxPermSize=128M", "-Xmx2048m"
testLogging {
outputs.upToDateWhen { false }
events "passed", "skipped", "failed", "standardOut", "standardError"
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
showCauses = true
showExceptions = true
showStackTraces = true
showStandardStreams = true
events "passed", "skipped", "failed", "standardOut", "standardError"
outputs.upToDateWhen { false }
}
}

checkstyle {
configFile = file("${project.rootDir}/config/checkstyle/checkstyle.xml")
toolVersion = '6.14.1'
}
checkstyleMain {
configFile = file("${project.rootDir}/config/checkstyle/default.xml")
ignoreFailures = false
tasks.withType(Checkstyle) {
reports {
// Not to skip up-to-date checkstyles.
outputs.upToDateWhen { false }
}
}
checkstyleTest {
configFile = file("${project.rootDir}/config/checkstyle/default.xml")

checkstyle {
toolVersion = libs.versions.checkstyle.get()
configFile = file("${rootProject.projectDir}/config/checkstyle/checkstyle.xml")
configProperties = [
"org.checkstyle.google.suppressionfilter.config": file("${rootProject.projectDir}/config/checkstyle/checkstyle-suppressions.xml"),
]
ignoreFailures = false
}
task checkstyle(type: Checkstyle) {
classpath = sourceSets.main.output + sourceSets.test.output
source = sourceSets.main.allJava + sourceSets.test.allJava
maxWarnings = 0
}
11 changes: 11 additions & 0 deletions config/checkstyle/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Checkstyle for the Embulk project
==================================

* google_check.xml: Downloaded from: https://github.com/checkstyle/checkstyle/blob/checkstyle-9.3/src/main/resources/google_checks.xml
* Commit: 5c1903792f8432243cc8ae5cd79a03a004d3c09c
* checkstyle.xml: Customized from google_check.xml.
* To enable suppressions through checkstyle-suppressions.xml.
* To enable suppressions with @SuppressWarnings.
* To indent with 4-column spaces.
* To limit columns to 180 characters.
* To reject unused imports.
14 changes: 14 additions & 0 deletions config/checkstyle/checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0"?>

<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.2//EN"
"http://checkstyle.sourceforge.net/dtds/suppressions_1_2.dtd">

<suppressions>
<suppress checks="JavadocMethod" files=".*"/>
<suppress checks="JavadocParagraph" files=".*"/>
<suppress checks="JavadocTagContinuationIndentation" files=".*"/>
<suppress checks="MissingJavadocType" files=".*"/>
<suppress checks="SingleLineJavadoc" files=".*"/>
<suppress checks="SummaryJavadoc" files=".*"/>
</suppressions>
Loading

0 comments on commit 83a29fe

Please sign in to comment.