Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkstyle with checkstyle 9.3 #15

Merged
merged 2 commits into from
Apr 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,11 @@ tasks.withType(Checkstyle) {
}

checkstyle {
toolVersion "8.7"
toolVersion = libs.versions.checkstyle.get()
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 // https://github.com/gradle/gradle/issues/881
maxWarnings = 0
}
9 changes: 4 additions & 5 deletions config/checkstyle/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +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: 60f41e3c16e6c94b0bf8c2e5e4b4accf4ad394ab
* 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 suppressions.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
Expand Up @@ -8,6 +8,7 @@
<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>
540 changes: 333 additions & 207 deletions config/checkstyle/checkstyle.xml

Large diffs are not rendered by default.

535 changes: 331 additions & 204 deletions config/checkstyle/google_checks.xml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions embulk-guess-json/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,11 @@ tasks.withType(Checkstyle) {
}

checkstyle {
toolVersion "8.7"
toolVersion = libs.versions.checkstyle.get()
configFile = file("${rootProject.projectDir}/config/checkstyle/checkstyle.xml")
configProperties = [
"checkstyle.config.path": file("${rootProject.projectDir}/config/checkstyle")
"org.checkstyle.google.suppressionfilter.config": file("${rootProject.projectDir}/config/checkstyle/checkstyle-suppressions.xml"),
]
ignoreFailures = false
maxWarnings = 0 // https://github.com/gradle/gradle/issues/881
maxWarnings = 0
}
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ embulk-util-timestamp = "0.2.2"
junit4 = "4.13.2"
embulk-core = "0.11.0"

checkstyle = "9.3"

[libraries]

embulk-spi = { group = "org.embulk", name = "embulk-spi", version.ref = "embulk-spi" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public void checkDefaultValues() {
assertEquals(JsonParserPlugin.InvalidEscapeStringPolicy.PASSTHROUGH, task.getInvalidEscapeStringPolicy());
}

@SuppressWarnings("checkstyle:Indentation")
@Test
public void readNormalJson() throws Exception {
transaction(config, fileInput(
Expand Down Expand Up @@ -227,6 +228,7 @@ public void useUnEscapeInvalidEscapeString() throws Exception {
assertEquals(JsonString.of("b"), object.get("a"));
}

@SuppressWarnings("checkstyle:Indentation")
@Test
public void checkInvalidEscapeStringFunction() {
//PASSTHROUGH
Expand Down
Loading