From 662d6f3bad861fa9d0bb9fe318d0d496b93d201c Mon Sep 17 00:00:00 2001 From: iosmanthus Date: Tue, 15 Feb 2022 09:18:31 +0800 Subject: [PATCH] [close #505] add xml formatter and check in CI (#506) --- .ci/build.groovy | 2 +- dev/intellij-java-google-style.xml | 430 ++++++++++++++--------------- dev/javafmt | 3 +- dev/spotbugs-include.xml | 12 +- pom.xml | 36 +-- 5 files changed, 243 insertions(+), 240 deletions(-) diff --git a/.ci/build.groovy b/.ci/build.groovy index 6443729da1..e8ddbdd00e 100644 --- a/.ci/build.groovy +++ b/.ci/build.groovy @@ -23,7 +23,7 @@ def call(ghprbActualCommit, ghprbPullId, ghprbPullTitle, ghprbPullLink, ghprbPul stage('Format') { dir("/home/jenkins/agent/git/client-java") { sh """ - mvn com.coveo:fmt-maven-plugin:format + ./dev/javafmt git diff --quiet formatted="\$?" if [[ "\${formatted}" -eq 1 ]] diff --git a/dev/intellij-java-google-style.xml b/dev/intellij-java-google-style.xml index 1ed8637ebb..b38766ccf8 100644 --- a/dev/intellij-java-google-style.xml +++ b/dev/intellij-java-google-style.xml @@ -2,222 +2,222 @@ - - diff --git a/dev/javafmt b/dev/javafmt index 828ca01b7a..047e45cd7e 100755 --- a/dev/javafmt +++ b/dev/javafmt @@ -2,4 +2,5 @@ echo $MAVEN_HOME -mvn com.coveo:fmt-maven-plugin:format \ No newline at end of file +mvn com.coveo:fmt-maven-plugin:format +mvn xml-format:xml-format diff --git a/dev/spotbugs-include.xml b/dev/spotbugs-include.xml index 53d4613176..a0991cd821 100644 --- a/dev/spotbugs-include.xml +++ b/dev/spotbugs-include.xml @@ -1,9 +1,9 @@ - - - - - - + + + + + + diff --git a/pom.xml b/pom.xml index e1aa3895d3..8910d61d1f 100644 --- a/pom.xml +++ b/pom.xml @@ -1,8 +1,6 @@ - + 4.0.0 - org.tikv tikv-client-java 3.2.0-SNAPSHOT @@ -10,7 +8,6 @@ TiKV Java Client A Java Client for TiKV http://github.com/tikv/client-java - Apache 2.0 License @@ -18,11 +15,9 @@ repo - PingCAP - Xiaoyu Ma @@ -49,13 +44,11 @@ https://www.pingcap.com - scm:git:git://github.com/tikv/client-java.git scm:git:ssh://github.com:tikv/client-java.git https://github.com/tikv/client-java/tree/master - 1.8 1.8 @@ -78,7 +71,6 @@ fake gpg key name true - io.perfmark @@ -252,7 +244,6 @@ 0.10.0 - @@ -268,7 +259,7 @@ true target/site - dev/spotbugs-include.xml + dev/spotbugs-include.xml @@ -278,8 +269,6 @@ - - @@ -374,7 +363,6 @@ - org.xolstice.maven.plugins protobuf-maven-plugin @@ -397,7 +385,6 @@ - org.apache.maven.plugins @@ -630,9 +617,25 @@ + + au.com.acegi + xml-format-maven-plugin + 3.2.0 + + + xml-format + validate + + xml-format + + + + + 4 + + - jdk9plus @@ -650,5 +653,4 @@ -