You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2022/05/12 04:17:01 UTC
[incubator-doris] branch master updated: [chore](fe code style)add suppressions to fe check style (#9429)
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new 122cc3b772 [chore](fe code style)add suppressions to fe check style (#9429)
122cc3b772 is described below
commit 122cc3b77236b7d49707ef0899f451e9f4b43bce
Author: morrySnow <10...@users.noreply.github.com>
AuthorDate: Thu May 12 12:16:55 2022 +0800
[chore](fe code style)add suppressions to fe check style (#9429)
Current fe check style check all files. But some rules should be only applied on production files.
Add suppressions to suppress some rules on test files.
---
fe/check/checkstyle/checkstyle.xml | 7 +++++++
fe/check/checkstyle/suppressions.xml | 30 ++++++++++++++++++++++++++++++
fe/pom.xml | 2 +-
3 files changed, 38 insertions(+), 1 deletion(-)
diff --git a/fe/check/checkstyle/checkstyle.xml b/fe/check/checkstyle/checkstyle.xml
index 0477368ce8..e576ac6938 100644
--- a/fe/check/checkstyle/checkstyle.xml
+++ b/fe/check/checkstyle/checkstyle.xml
@@ -32,6 +32,11 @@ under the License.
<property name="fileNamePattern" value="module\-info\.java$"/>
</module>
+ <module name="SuppressionFilter">
+ <property name="file" value="fe/check/checkstyle/suppressions.xml"/>
+ <property name="optional" value="true"/>
+ </module>
+
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>
@@ -171,6 +176,7 @@ under the License.
</module>
<module name="InvalidJavadocPosition"/>
<module name="JavadocMethod">
+ <property name="id" value="ProductionScope"/>
<property name="accessModifiers" value="public"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
@@ -179,6 +185,7 @@ under the License.
</module>
<module name="JavadocParagraph"/>
+ <module name="JavadocStyle"/>
<module name="JavadocTagContinuationIndentation"/>
<module name="MissingJavadocMethod">
<property name="scope" value="public"/>
diff --git a/fe/check/checkstyle/suppressions.xml b/fe/check/checkstyle/suppressions.xml
new file mode 100644
index 0000000000..4f7909fd1f
--- /dev/null
+++ b/fe/check/checkstyle/suppressions.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!DOCTYPE suppressions PUBLIC
+ "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
+ "https://checkstyle.org/dtds/suppressions_1_2.dtd">
+
+<suppressions>
+ <!-- Excludes test files from having Javadocs for classes and methods -->
+ <suppress files="[\\/]jmockit[\\/]" checks=".*" />
+ <suppress files="[\\/]test[\\/]" checks="MissingJavadocMethod" />
+ <suppress files="[\\/]test[\\/]" checks="MissingJavadocType" />
+</suppressions>
diff --git a/fe/pom.xml b/fe/pom.xml
index b263f81b79..11fee07c94 100644
--- a/fe/pom.xml
+++ b/fe/pom.xml
@@ -151,11 +151,11 @@ under the License.
</dependencies>
<configuration>
<configLocation>check/checkstyle/checkstyle.xml</configLocation>
+ <suppressionsLocation>check/checkstyle/suppressions.xml</suppressionsLocation>
<encoding>UTF-8</encoding>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
<linkXRef>false</linkXRef>
- <excludes>**/jmockit/**/*</excludes>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
</configuration>
<executions>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org