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

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


The following commit(s) were added to refs/heads/master by this push:
     new 38fb15177 [feature] update-checkstyle limit the java file header  
(#1799)
38fb15177 is described below

commit 38fb15177571eb5cc6bc0f45d04f20d3320b49a6
Author: YxYL <[email protected]>
AuthorDate: Sat Apr 20 23:52:15 2024 +0800

    [feature] update-checkstyle limit the java file header  (#1799)
    
    Co-authored-by: tomsun28 <[email protected]>
---
 script/checkstyle/checkstyle.xml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/script/checkstyle/checkstyle.xml b/script/checkstyle/checkstyle.xml
index 3ed605d84..564ca7947 100644
--- a/script/checkstyle/checkstyle.xml
+++ b/script/checkstyle/checkstyle.xml
@@ -228,7 +228,7 @@
             <property name="offset" value="0"/>
         </module>
         <module name="AtclauseOrder">
-            <property name="tagOrder" value="@param, @return, @throws, 
@deprecated, @author"/>
+            <property name="tagOrder" value="@param, @return, @throws, 
@deprecated"/>
             <property name="target"
                       value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, 
CTOR_DEF, VARIABLE_DEF"/>
         </module>
@@ -276,5 +276,11 @@
             <property name="checkFormat" value="$1"/>
             <property name="influenceFormat" value="1"/>
         </module>
+        <module name="RegexpSinglelineJava">
+            <property name="format" 
+                      value="^.*(@author|@date).*" />
+            <property name="message" 
+                      value="Java file header cannot contain @author or @date" 
/>
+        </module>
     </module>
 </module>


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

Reply via email to