From d5565ec73bfe01a90a70e662b1b93fcd8c60fcf9 Mon Sep 17 00:00:00 2001 From: lamber-ken Date: Thu, 12 Dec 2019 20:52:11 +0800 Subject: [PATCH 1/2] [HUDI-386] Refactor hudi scala checkstyle rules --- pom.xml | 2 +- style/checkstyle.xml | 2 +- .../{scalastyle-config.xml => scalastyle.xml} | 68 ++++++++++++------- 3 files changed, 46 insertions(+), 26 deletions(-) rename style/{scalastyle-config.xml => scalastyle.xml} (53%) diff --git a/pom.xml b/pom.xml index c61e4a66d229b..ab99498fffe82 100644 --- a/pom.xml +++ b/pom.xml @@ -163,7 +163,7 @@ false ${project.basedir}/src/main/scala ${project.basedir}/src/test/scala - ${main.basedir}/style/scalastyle-config.xml + ${main.basedir}/style/scalastyle.xml UTF-8 diff --git a/style/checkstyle.xml b/style/checkstyle.xml index 10ef5fc40d2fb..24dfbb6ca341d 100644 --- a/style/checkstyle.xml +++ b/style/checkstyle.xml @@ -24,7 +24,7 @@ that can be found at https://google.github.io/styleguide/javaguide.html. Checkstyle is very configurable. Be sure to read the documentation at - http://checkstyle.sf.net (or in your downloaded distribution). + https://checkstyle.sourceforge.io/checks.html. To completely disable a check, just comment it out or delete it from the file. diff --git a/style/scalastyle-config.xml b/style/scalastyle.xml similarity index 53% rename from style/scalastyle-config.xml rename to style/scalastyle.xml index c3d551df1943c..00a5b1b277790 100644 --- a/style/scalastyle-config.xml +++ b/style/scalastyle.xml @@ -14,45 +14,53 @@ See the License for the specific language governing permissions and limitations under the License. --> + + + Scalastyle standard configuration - - + + - - - + + + - + - + - + - - + + - + @@ -62,20 +70,20 @@ - - + + - - - - + + + + - + @@ -85,8 +93,8 @@ - - + + @@ -98,17 +106,29 @@ - + - + - - + + + + + + hudi,3rdParty,javax,java,scala + org\.apache\.hudi\..* + (?!org\.apache\.hudi\.).* + java?\..* + javax?\..* + scala\..* + + + From 3aa1003abb315426ab21f60cf9815fb772eb82d3 Mon Sep 17 00:00:00 2001 From: lamber-ken Date: Thu, 12 Dec 2019 21:04:06 +0800 Subject: [PATCH 2/2] disable rules which can't pass --- style/scalastyle.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/style/scalastyle.xml b/style/scalastyle.xml index 00a5b1b277790..7ad1d5ed67e77 100644 --- a/style/scalastyle.xml +++ b/style/scalastyle.xml @@ -33,7 +33,7 @@ - + @@ -65,20 +65,20 @@ - + - - + + - + @@ -88,20 +88,20 @@ - + - + - + @@ -116,7 +116,7 @@ - +