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 Apr 10, 2024
1 parent 990fb34 commit 8f32535
Show file tree
Hide file tree
Showing 6 changed files with 686 additions and 479 deletions.
24 changes: 16 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ version = "0.7.0-SNAPSHOT"
description = "A Gradle plugin to build and publish Embulk plugins"

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
options.encoding = "UTF-8"
}

java {
Expand All @@ -32,8 +32,9 @@ dependencies {
implementation gradleApi()

testImplementation gradleTestKit()
testImplementation "org.junit.jupiter:junit-jupiter-api:5.10.1"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.10.1"
testImplementation platform(libs.junit5.bom)
testImplementation libs.bundles.junit5.implementation
testRuntimeOnly libs.bundles.junit5.runtime
}

jar {
Expand All @@ -60,21 +61,28 @@ gradlePlugin {
test {
useJUnitPlatform()
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 }
}
}

tasks.withType(Checkstyle) {
reports {
// Not to skip up-to-date checkstyles.
outputs.upToDateWhen { false }
}
}

checkstyle {
toolVersion "8.23"
configFile = file("${projectDir}/config/checkstyle/checkstyle.xml")
toolVersion "9.3"
configFile = file("${rootProject.projectDir}/config/checkstyle/checkstyle.xml")
configProperties = [
"checkstyle.config.path": file("${projectDir}/config/checkstyle")
"org.checkstyle.google.suppressionfilter.config": file("${rootProject.projectDir}/config/checkstyle/checkstyle-suppressions.xml"),
]
ignoreFailures = false
maxWarnings = 0
Expand Down
8 changes: 4 additions & 4 deletions config/checkstyle/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Checkstyle for the Embulk project
==================================

* google_check.xml: Downloaded from: https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
* Commit: e145aa1c2829f1bc3cccb879dd5197a4904f5687
* 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 accept package names with underscores.
* To indent with 4-column spaces.
* To limit columns to 180 characters, which will be shortened later.
* To limit columns to 180 characters.
* To reject unused imports.
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<?xml version="1.0"?>

<!DOCTYPE suppressions PUBLIC
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
"-//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="PackageName" files=".*"/>
<suppress checks="SingleLineJavadoc" files=".*"/>
<suppress checks="SummaryJavadoc" files=".*"/>
</suppressions>
Loading

0 comments on commit 8f32535

Please sign in to comment.