You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2025/02/12 02:45:48 UTC
(spark) branch branch-4.0 updated: [SPARK-51173][TESTS] Add `configName` Scalastyle rule
This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-4.0 by this push:
new da1742713247 [SPARK-51173][TESTS] Add `configName` Scalastyle rule
da1742713247 is described below
commit da1742713247ab0203a9e753f6d710b5e328da8b
Author: Dongjoon Hyun <do...@apache.org>
AuthorDate: Tue Feb 11 18:45:09 2025 -0800
[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 <do...@apache.org>
Signed-off-by: Dongjoon Hyun <do...@apache.org>
(cherry picked from commit 274dc5e05846d481a640fd7926bcdcc065fd6975)
Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
scalastyle-config.xml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scalastyle-config.xml b/scalastyle-config.xml
index 7e64dc9be673..d48f9489cb1f 100644
--- a/scalastyle-config.xml
+++ b/scalastyle-config.xml
@@ -477,4 +477,9 @@ This file is divided into 3 sections:
<parameters><parameter name="regex">new URL\(</parameter></parameters>
<customMessage>Use URI.toURL or URL.of instead of URL constructors.</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: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org