Skip to content

Commit 0dc22df

Browse files
committed
[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 <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]> (cherry picked from commit 38240a7) Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent 94ddc2a commit 0dc22df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scalastyle-config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ This file is divided into 3 sections:
234234
scala.collection.JavaConverters._ and use .asScala / .asJava methods</customMessage>
235235
</check>
236236

237-
<check customId="commonslang2" level="error" class="org.scalastyle.scalariform.TokenChecker" enabled="true">
237+
<check customId="commonslang2" level="error" class="org.scalastyle.file.RegexChecker" enabled="true">
238238
<parameters><parameter name="regex">org\.apache\.commons\.lang\.</parameter></parameters>
239239
<customMessage>Use Commons Lang 3 classes (package org.apache.commons.lang3.*) instead
240240
of Commons Lang 2 (package org.apache.commons.lang.*)</customMessage>

0 commit comments

Comments
 (0)