Skip to content

Commit 274dc5e

Browse files
committed
[SPARK-51173][TESTS] Add configName Scalastyle rule
### What changes were proposed in this pull request? This PR aims to add `configName` Scalastyle rule to prevent invalid config names. ### Why are the changes needed? To prevent repetitive mistake pattern - #45649 - #48149 - #49121 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Currently, this PR will fail at Scalastyle test because the `master` branch is broken. We can merge this after the following PR. - #49897 ### Was this patch authored or co-authored using generative AI tooling? No. Closes #49900 from dongjoon-hyun/SPARK-51173. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent decb677 commit 274dc5e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scalastyle-config.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,4 +477,9 @@ This file is divided into 3 sections:
477477
<parameters><parameter name="regex">new URL\(</parameter></parameters>
478478
<customMessage>Use URI.toURL or URL.of instead of URL constructors.</customMessage>
479479
</check>
480+
481+
<check customId="configName" level="error" class="org.scalastyle.file.RegexChecker" enabled="true">
482+
<parameters><parameter name="regex">buildConf\("spark.databricks.</parameter></parameters>
483+
<customMessage>Use Apache Spark config namespace.</customMessage>
484+
</check>
480485
</scalastyle>

0 commit comments

Comments
 (0)