Skip to content

Commit 6ffd236

Browse files
authored
Merge pull request #18 from trocco-io/spotless
Spotless
2 parents a660df3 + ef6dc04 commit 6ffd236

File tree

12 files changed

+945
-1142
lines changed

12 files changed

+945
-1142
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ jobs:
2121
uses: actions/setup-java@v1
2222
with:
2323
java-version: 1.8
24-
# TODO: Change this step after appling spotless.
25-
# - name: lint
26-
# run: ./gradlew checkstyle
24+
- name: lint
25+
# Run ./gradlew spotlessApply when failing on this step.
26+
run: ./gradlew spotlessCheck
2727
- run: ./gradlew test
2828

2929
- name: Show Current Version

build.gradle

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
plugins {
22
id "java"
3-
id "checkstyle"
43
id "maven-publish"
54
id "org.embulk.embulk-plugins" version "0.4.2"
65
id "com.palantir.git-version" version "0.12.3"
6+
id "com.diffplug.spotless" version "5.15.0"
77
}
88
repositories {
99
mavenCentral()
@@ -81,19 +81,10 @@ gem {
8181
gemPush {
8282
host = "https://rubygems.org"
8383
}
84-
checkstyle {
85-
configFile = file("${project.rootDir}/config/checkstyle/checkstyle.xml")
86-
toolVersion = '6.14.1'
87-
}
88-
checkstyleMain {
89-
configFile = file("${project.rootDir}/config/checkstyle/default.xml")
90-
ignoreFailures = true
91-
}
92-
checkstyleTest {
93-
configFile = file("${project.rootDir}/config/checkstyle/default.xml")
94-
ignoreFailures = true
95-
}
96-
task checkstyle(type: Checkstyle) {
97-
classpath = sourceSets.main.output + sourceSets.test.output
98-
source = sourceSets.main.allJava + sourceSets.test.allJava
84+
spotless {
85+
java {
86+
importOrder()
87+
removeUnusedImports()
88+
googleJavaFormat()
89+
}
9990
}

config/checkstyle/checkstyle.xml

Lines changed: 0 additions & 128 deletions
This file was deleted.

config/checkstyle/default.xml

Lines changed: 0 additions & 108 deletions
This file was deleted.

0 commit comments

Comments
 (0)