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

englefly pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new f33c681e3da [opt](build)make checkstyle.xml compatible to vscode 
(#61431)
f33c681e3da is described below

commit f33c681e3da55213181a842bbb65522c6ea70c52
Author: minghong <[email protected]>
AuthorDate: Fri Mar 20 09:50:13 2026 +0800

    [opt](build)make checkstyle.xml compatible to vscode (#61431)
    
    make checkstyle.xml compatible to vscode
---
 fe/check/checkstyle/checkstyle.xml | 6 +++---
 fe/pom.xml                         | 8 ++++++++
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/fe/check/checkstyle/checkstyle.xml 
b/fe/check/checkstyle/checkstyle.xml
index 86f303d84c8..2b87546548b 100644
--- a/fe/check/checkstyle/checkstyle.xml
+++ b/fe/check/checkstyle/checkstyle.xml
@@ -33,7 +33,7 @@ under the License.
     </module>
 
     <module name="SuppressionFilter">
-        <property name="file" value="check/checkstyle/suppressions.xml"/>
+        <property name="file" value="${config_loc}/suppressions.xml"/>
         <property name="optional" value="true"/>
     </module>
     <module name="SuppressWithPlainTextCommentFilter">
@@ -45,7 +45,7 @@ under the License.
         <property name="eachLine" value="true"/>
     </module>
     <module name="Header">
-        <property name="headerFile" 
value="check/checkstyle/checkstyle-apache-header.txt"/>
+        <property name="headerFile" 
value="${config_loc}/checkstyle-apache-header.txt"/>
         <property name="fileExtensions" value="java"/>
     </module>
     <module name="LineLength">
@@ -161,7 +161,7 @@ under the License.
             <property name="tokens" value="IMPORT, STATIC_IMPORT, 
PACKAGE_DEF"/>
         </module>
         <module name="ImportControl">
-            <property name="file" value="check/checkstyle/import-control.xml"/>
+            <property name="file" value="${config_loc}/import-control.xml"/>
         </module>
         <module name="RedundantImport"/>
         <module name="UnusedImports"/>
diff --git a/fe/pom.xml b/fe/pom.xml
index 0b17a9a18df..eed81db5955 100644
--- a/fe/pom.xml
+++ b/fe/pom.xml
@@ -191,6 +191,14 @@ under the License.
                         <failsOnError>true</failsOnError>
                         <linkXRef>false</linkXRef>
                         
<includeTestSourceDirectory>true</includeTestSourceDirectory>
+                        <!-- Explicitly set config_loc so that checkstyle.xml 
can reference sibling
+                             files via ${config_loc}/suppressions.xml etc.
+                             maven-checkstyle-plugin 3.0+ sets this 
automatically, but older
+                             versions do not, causing "Property ${config_loc} 
has not been set".
+                             ${maven.multiModuleProjectDirectory} always 
points to the directory
+                             from which Maven was invoked (the fe/ root), so 
this works for all
+                             submodules regardless of nesting depth. Requires 
Maven 3.3.1+. -->
+                        
<propertyExpansion>config_loc=${maven.multiModuleProjectDirectory}/check/checkstyle</propertyExpansion>
                         <excludes>
                             **/apache/doris/thrift/**/*,
                             **/apache/parquet/**/*


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

Reply via email to