This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch branch-2.4
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-2.4 by this push:
     new 0dc22df  [SPARK-30030][INFRA] Use RegexChecker instead of TokenChecker 
to check `org.apache.commons.lang.`
0dc22df is described below

commit 0dc22df84f2fa53d60b418e8dca42bd959980083
Author: Dongjoon Hyun <dh...@apple.com>
AuthorDate: Mon Nov 25 12:03:15 2019 -0800

    [SPARK-30030][INFRA] Use RegexChecker instead of TokenChecker to check 
`org.apache.commons.lang.`
    
    This PR replace `TokenChecker` with `RegexChecker` in `scalastyle` and 
fixes the missed instances.
    
    This will remove the old `comons-lang2` dependency from `core` module
    
    **BEFORE**
    ```
    $ dev/scalastyle
    Scalastyle checks failed at following occurrences:
    [error] 
/Users/dongjoon/PRS/SPARK-SerializationUtils/core/src/test/scala/org/apache/spark/util/PropertiesCloneBenchmark.scala:23:7:
 Use Commons Lang 3 classes (package org.apache.commons.lang3.*) instead
    [error]     of Commons Lang 2 (package org.apache.commons.lang.*)
    [error] Total time: 23 s, completed Nov 25, 2019 11:47:44 AM
    ```
    
    **AFTER**
    ```
    $ dev/scalastyle
    Scalastyle checks passed.
    ```
    
    No.
    
    Pass the GitHub Action linter.
    
    Closes #26666 from dongjoon-hyun/SPARK-29081-2.
    
    Authored-by: Dongjoon Hyun <dh...@apple.com>
    Signed-off-by: Dongjoon Hyun <dh...@apple.com>
    (cherry picked from commit 38240a74dc047796e9f239e44d9bc0bbc66e1f7f)
    Signed-off-by: Dongjoon Hyun <dh...@apple.com>
---
 scalastyle-config.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scalastyle-config.xml b/scalastyle-config.xml
index da5c3f2..866e938 100644
--- a/scalastyle-config.xml
+++ b/scalastyle-config.xml
@@ -234,7 +234,7 @@ This file is divided into 3 sections:
     scala.collection.JavaConverters._ and use .asScala / .asJava 
methods</customMessage>
   </check>
 
-  <check customId="commonslang2" level="error" 
class="org.scalastyle.scalariform.TokenChecker" enabled="true">
+  <check customId="commonslang2" level="error" 
class="org.scalastyle.file.RegexChecker" enabled="true">
     <parameters><parameter 
name="regex">org\.apache\.commons\.lang\.</parameter></parameters>
     <customMessage>Use Commons Lang 3 classes (package 
org.apache.commons.lang3.*) instead
     of Commons Lang 2 (package org.apache.commons.lang.*)</customMessage>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to