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

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


The following commit(s) were added to refs/heads/branch-3.5 by this push:
     new d65ecc03caaf [SPARK-51173][TESTS] Add `configName` Scalastyle rule
d65ecc03caaf is described below

commit d65ecc03caaf96d7381301be89991be502871fbd
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Tue Feb 11 18:45:09 2025 -0800

    [SPARK-51173][TESTS] Add `configName` Scalastyle rule
    
    This PR aims to add `configName` Scalastyle rule to prevent invalid config 
names.
    
    To prevent repetitive mistake pattern
    - #45649
    - #48149
    - #49121
    
    No.
    
    Currently, this PR will fail at Scalastyle test because the `master` branch 
is broken. We can merge this after the following PR.
    - #49897
    
    No.
    
    Closes #49900 from dongjoon-hyun/SPARK-51173.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
    (cherry picked from commit 274dc5e05846d481a640fd7926bcdcc065fd6975)
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 scalastyle-config.xml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scalastyle-config.xml b/scalastyle-config.xml
index 0ccd937e72e8..38707006dac9 100644
--- a/scalastyle-config.xml
+++ b/scalastyle-config.xml
@@ -462,4 +462,9 @@ This file is divided into 3 sections:
       and URIs to and from String. If possible, please use SparkPath.
     ]]></customMessage>
   </check>
+
+  <check customId="configName" level="error" 
class="org.scalastyle.file.RegexChecker" enabled="true">
+    <parameters><parameter 
name="regex">buildConf\("spark.databricks.</parameter></parameters>
+    <customMessage>Use Apache Spark config namespace.</customMessage>
+  </check>
 </scalastyle>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to