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

panyuepeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-benchmarks.git

commit 9ac3569d0148543ad5768c60ceac03d8d6e0eef1
Author: panyuepeng <[email protected]>
AuthorDate: Wed Dec 17 13:13:26 2025 +0800

    [FLINK-38801][benchmark] Add Spotless and checkstyle plugins with Google 
AOSP style for flink benchmark repository
---
 pom.xml                      | 111 ++++++++++-
 tools/maven/checkstyle.xml   | 437 +++++++++++++++++++++++++++++++++++++++++++
 tools/maven/suppressions.xml |  72 +++++++
 3 files changed, 619 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 9a2db7a..6434cf1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -69,6 +69,32 @@ under the License.
                <executableJava>java</executableJava>
                <jmhProfArgument> </jmhProfArgument>
                
<profilerOutputDir>${build.directory}/profile-results</profilerOutputDir>
+
+        <!-- The spotless related.-->
+        <checkstyle.version>10.18.2</checkstyle.version>
+        <spotless.skip>false</spotless.skip>
+        <spotless.version>2.43.0</spotless.version>
+        <spotless.scalafmt.version>3.4.3</spotless.scalafmt.version>
+        <spotless.delimiter>package</spotless.delimiter>
+        <spotless.license.header>
+            /*
+            * 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.
+            */
+        </spotless.license.header>
        </properties>
 
        <repositories>
@@ -630,7 +656,82 @@ under the License.
        </profiles>
 
        <build>
-               <extensions>
+
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-checkstyle-plugin</artifactId>
+                    <version>3.3.1</version>
+                    <dependencies>
+                        <dependency>
+                            <groupId>com.puppycrawl.tools</groupId>
+                            <artifactId>checkstyle</artifactId>
+                            <!-- Note: match version with 
docs/flinkDev/ide_setup.md -->
+                            <version>${checkstyle.version}</version>
+                        </dependency>
+                    </dependencies>
+
+                    <executions>
+                        <execution>
+                            <id>validate</id>
+                            <phase>validate</phase>
+                            <goals>
+                                <goal>check</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                    <configuration>
+                        <!-- Skip the packages, because the classes in the 
package is generated to follow thrift.-->
+                        <excludes>
+                            org/apache/flink/benchmark/thrift/**
+                        </excludes>
+                        
<suppressionsLocation>/tools/maven/suppressions.xml</suppressionsLocation>
+                        
<includeTestSourceDirectory>true</includeTestSourceDirectory>
+                        
<configLocation>/tools/maven/checkstyle.xml</configLocation>
+                        <logViolationsToConsole>true</logViolationsToConsole>
+                        <failOnViolation>true</failOnViolation>
+                    </configuration>
+                </plugin>
+
+                <plugin>
+                    <groupId>com.diffplug.spotless</groupId>
+                    <artifactId>spotless-maven-plugin</artifactId>
+                    <version>${spotless.version}</version>
+                    <configuration>
+                        <java>
+                            <googleJavaFormat>
+                                <version>1.24.0</version>
+                                <style>AOSP</style>
+                            </googleJavaFormat>
+
+                            <!-- \# refers to the static imports -->
+                            <importOrder>
+                                
<order>org.apache.flink,org.apache.flink.shaded,,javax,java,scala,\#</order>
+                            </importOrder>
+
+                            <removeUnusedImports />
+
+                            <excludes>
+                                <!-- Skip the packages, because the classes in 
the package is generated to follow thrift.-->
+                                
<exclude>src/main/java/org/apache/flink/benchmark/thrift/**</exclude>
+                            </excludes>
+                        </java>
+                    </configuration>
+                    <executions>
+                        <execution>
+                            <id>spotless-check</id>
+                            <phase>validate</phase>
+                            <goals>
+                                <goal>check</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+
+        <extensions>
                        <!-- required for getting the correct protoc binary for 
protobuf -->
                        <extension>
                                <groupId>kr.motd.maven</groupId>
@@ -754,6 +855,14 @@ under the License.
                                        </execution>
                                </executions>
                        </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>com.diffplug.spotless</groupId>
+                <artifactId>spotless-maven-plugin</artifactId>
+            </plugin>
                </plugins>
        </build>
 </project>
diff --git a/tools/maven/checkstyle.xml b/tools/maven/checkstyle.xml
new file mode 100644
index 0000000..ff6c139
--- /dev/null
+++ b/tools/maven/checkstyle.xml
@@ -0,0 +1,437 @@
+<?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 module PUBLIC
+       "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
+       "http://www.puppycrawl.com/dtds/configuration_1_3.dtd";>
+
+<!--
+This is a checkstyle configuration file. For descriptions of
+what the following rules do, please see the checkstyle configuration
+page at http://checkstyle.sourceforge.net/config.html.
+
+This file is based on the checkstyle file of Apache Beam.
+-->
+
+<module name="Checker">
+
+       <module name="RegexpSingleline">
+               <!-- Checks that TODOs don't have stuff in parenthesis, e.g., 
username. -->
+               <property name="format" value="((//.*)|(\*.*))TODO\("/>
+               <property name="message" value="TODO comments must not include 
usernames."/>
+               <property name="severity" value="error"/>
+       </module>
+
+       <module name="RegexpSingleline">
+               <property name="format" value="\s+$"/>
+               <property name="message" value="Trailing whitespace"/>
+               <property name="severity" value="error"/>
+       </module>
+
+       <module name="RegexpSingleline">
+               <property name="format" value="Throwables.propagate\("/>
+               <property name="message" value="Throwables.propagate is 
deprecated"/>
+               <property name="severity" value="error"/>
+       </module>
+
+       <module name="SuppressionFilter">
+               <property name="file" value="${checkstyle.suppressions.file}" 
default="suppressions.xml"/>
+       </module>
+
+       <!--
+
+       FLINK CUSTOM CHECKS
+
+       -->
+
+       <module name="FileLength">
+               <property name="max" value="3100"/>
+       </module>
+
+       <!-- All Java AST specific tests live under TreeWalker module. -->
+       <module name="TreeWalker">
+
+               <!-- Allow use of comment to suppress javadocstyle -->
+               <module name="SuppressionCommentFilter">
+                       <property name="offCommentFormat" 
value="CHECKSTYLE.OFF\: ([\w\|]+)"/>
+                       <property name="onCommentFormat" value="CHECKSTYLE.ON\: 
([\w\|]+)"/>
+                       <property name="checkFormat" value="$1"/>
+               </module>
+
+               <!--
+
+               FLINK CUSTOM CHECKS
+
+               -->
+
+               <!-- Prohibit T.getT() methods for standard boxed types -->
+               <module name="Regexp">
+                       <property name="format" value="Boolean\.getBoolean"/>
+                       <property name="illegalPattern" value="true"/>
+                       <property name="message" value="Use 
System.getProperties() to get system properties."/>
+               </module>
+
+               <module name="Regexp">
+                       <property name="format" value="Integer\.getInteger"/>
+                       <property name="illegalPattern" value="true"/>
+                       <property name="message" value="Use 
System.getProperties() to get system properties."/>
+               </module>
+
+               <module name="Regexp">
+                       <property name="format" value="Long\.getLong"/>
+                       <property name="illegalPattern" value="true"/>
+                       <property name="message" value="Use 
System.getProperties() to get system properties."/>
+               </module>
+
+               <!--
+
+               IllegalImport cannot blacklist classes so we have to fall back 
to Regexp.
+
+               -->
+
+               <!-- forbid use of commons lang validate -->
+               <module name="Regexp">
+                       <property name="format" 
value="org\.apache\.commons\.lang3\.Validate"/>
+                       <property name="illegalPattern" value="true"/>
+                       <property name="message"
+                                         value="Use Guava Checks instead of 
Commons Validate. Please refer to the coding guidelines."/>
+               </module>
+               <!-- forbid the use of google.common.base.Preconditions -->
+               <module name="Regexp">
+                       <property name="format" value="import 
com\.google\.common\.base\.Preconditions"/>
+                       <property name="illegalPattern" value="true"/>
+                       <property name="message"
+                                         value="Use Flink's Preconditions 
instead of Guava's Preconditions"/>
+               </module>
+               <!-- forbid the use of 
com.google.common.annotations.VisibleForTesting -->
+               <module name="Regexp">
+                       <property name="format"
+                                         value="import 
com\.google\.common\.annotations\.VisibleForTesting"/>
+                       <property name="illegalPattern" value="true"/>
+                       <property name="message"
+                                         value="Use Flink's VisibleForTesting 
instead of Guava's VisibleForTesting"/>
+               </module>
+               <module name="Regexp">
+                       <property name="format" value="import static 
com\.google\.common\.base\.Preconditions"/>
+                       <property name="illegalPattern" value="true"/>
+                       <property name="message"
+                                         value="Use Flink's Preconditions 
instead of Guava's Preconditions"/>
+               </module>
+               <!-- forbid the use of 
org.apache.commons.lang.SerializationUtils -->
+               <module name="Regexp">
+                       <property name="format" 
value="org\.apache\.commons\.lang\.SerializationUtils"/>
+                       <property name="illegalPattern" value="true"/>
+                       <property name="message"
+                                         value="Use Flink's InstantiationUtil 
instead of common's SerializationUtils"/>
+               </module>
+               <module name="Regexp">
+                       <property name="format" 
value="org\.apache\.commons\.lang3\.SerializationUtils"/>
+                       <property name="illegalPattern" value="true"/>
+                       <property name="message"
+                                         value="Use Flink's InstantiationUtil 
instead of common's SerializationUtils"/>
+               </module>
+               <module name="Regexp">
+                       <property name="format" 
value="org\.apache\.commons\.lang\."/>
+                       <property name="illegalPattern" value="true"/>
+                       <property name="message" value="Use commons-lang3 
instead of commons-lang."/>
+               </module>
+               <module name="Regexp">
+                       <property name="format" 
value="org\.codehaus\.jettison"/>
+                       <property name="illegalPattern" value="true"/>
+                       <property name="message" value="Use 
com.fasterxml.jackson instead of jettison."/>
+               </module>
+               <module name="Regexp">
+                       <property name="format" 
value="org\.testcontainers\.shaded"/>
+                       <property name="illegalPattern" value="true"/>
+                       <property name="message" value="Use utilities from 
appropriate library instead of org.testcontainers."/>
+               </module>
+
+               <!-- Enforce Java-style array declarations -->
+               <module name="ArrayTypeStyle"/>
+
+               <module name="TodoComment">
+                       <!-- Checks that disallowed strings are not used in 
comments.  -->
+                       <property name="format" 
value="(FIXME)|(XXX)|(@author)"/>
+               </module>
+
+               <!--
+
+               IMPORT CHECKS
+
+               -->
+
+               <module name="AvoidStarImport">
+                       <property name="severity" value="error"/>
+               </module>
+
+               <module name="IllegalImport">
+                       <property name="illegalPkgs"
+                                         value="org.mockito, org.powermock"/>
+                       <message key="import.illegal" value="{0}; Mocking is 
discouraged. Please refer to the coding guidelines: 
https://flink.apache.org/how-to-contribute/code-style-and-quality-common/#avoid-mockito---use-reusable-test-implementations."/>
+               </module>
+               <module name="IllegalImport">
+                       <property name="illegalPkgs"
+                                         value="autovalue.shaded, avro.shaded, 
com.google.api.client.repackaged, com.google.appengine.repackaged"/>
+               </module>
+               <module name="IllegalImport">
+                       <property name="illegalPkgs" 
value="org.codehaus.jackson"/>
+                       <message key="import.illegal" value="{0}; Use 
flink-shaded-jackson instead."/>
+               </module>
+               <module name="IllegalImport">
+                       <property name="illegalPkgs" 
value="com.jayway.jsonpath"/>
+                       <message key="import.illegal" value="{0}; Use 
flink-shaded-jsonpath instead."/>
+               </module>
+               <module name="IllegalImport">
+                       <property name="illegalPkgs" value="org.objectweb.asm"/>
+                       <message key="import.illegal" value="{0}; Use 
flink-shaded-asm instead."/>
+               </module>
+               <module name="IllegalImport">
+                       <property name="illegalPkgs" value="io.netty"/>
+                       <message key="import.illegal" value="{0}; Use 
flink-shaded-netty instead."/>
+               </module>
+               <module name="IllegalImport">
+                       <property name="illegalPkgs" value="com.google.common"/>
+                       <message key="import.illegal" value="{0}; Use 
flink-shaded-guava instead."/>
+               </module>
+
+               <module name="RedundantModifier">
+                       <!-- Checks for redundant modifiers on various symbol 
definitions.
+                         See: 
https://checkstyle.sourceforge.io/checks/modifier/redundantmodifier.html#RedundantModifier
+
+                         We exclude METHOD_DEF to allow final methods in final 
classes to make them more future-proof.
+                       -->
+                       <property name="tokens"
+                                         value="VARIABLE_DEF, 
ANNOTATION_FIELD_DEF, INTERFACE_DEF, CLASS_DEF, ENUM_DEF"/>
+               </module>
+
+               <!--
+                       IllegalImport cannot blacklist classes, and 
c.g.api.client.util is used for some shaded
+                       code and some useful code. So we need to fall back to 
Regexp.
+               -->
+
+               <!--
+                        Require static importing from Preconditions.
+               -->
+               <module name="RegexpSinglelineJava">
+                       <property name="format" value="^import 
com.google.common.base.Preconditions;$"/>
+                       <property name="message" value="Static import functions 
from Guava Preconditions"/>
+               </module>
+
+               <!--
+                       The Nullable & Nonnull annotations check.
+               -->
+               <module name="RegexpSinglelineJava">
+                       <property name="format" value="^import 
org.jetbrains.annotations.Nullable;$"/>
+                       <property name="message" value="Use import 
javax.annotation.Nullable"/>
+               </module>
+
+               <module name="RegexpSinglelineJava">
+                       <property name="format" value="^import 
org.jetbrains.annotations.NotNull;$"/>
+                       <property name="message" value="Use import 
javax.annotation.Nonnull"/>
+               </module>
+
+               <module name="RegexpSinglelineJava">
+                       <property name="format" 
value="^\s*@org.jetbrains.annotations.Nullable\s*$"/>
+                       <property name="message" value="Use import 
javax.annotation.Nullable"/>
+               </module>
+
+               <module name="RegexpSinglelineJava">
+                       <property name="format" 
value="^\s*@org.jetbrains.annotations.Nonnull\s*$"/>
+                       <property name="message" value="Use import 
javax.annotation.Nonnull"/>
+               </module>
+
+               <!--
+
+               JAVADOC CHECKS
+
+               -->
+
+               <!-- Checks for Javadoc comments.                     -->
+               <!-- See 
https://checkstyle.sourceforge.io/checks/javadoc/javadocmethod.html -->
+               <module name="JavadocMethod">
+                       <property name="accessModifiers" value="protected"/>
+                       <property name="severity" value="error"/>
+                       <property name="allowMissingParamTags" value="true"/>
+                       <property name="allowMissingReturnTag" value="true"/>
+               </module>
+
+               <!-- Check that paragraph tags are used correctly in Javadoc. 
-->
+               <module name="JavadocParagraph"/>
+
+               <module name="JavadocType">
+                       <property name="scope" value="protected"/>
+                       <property name="severity" value="error"/>
+                       <property name="allowMissingParamTags" value="true"/>
+               </module>
+
+               <module name="JavadocStyle">
+                       <property name="severity" value="error"/>
+                       <property name="checkHtml" value="true"/>
+               </module>
+
+               <!--
+
+               NAMING CHECKS
+
+               -->
+
+               <!-- Item 38 - Adhere to generally accepted naming conventions 
-->
+
+               <module name="PackageName">
+                       <!-- Validates identifiers for package names against the
+                         supplied expression. -->
+                       <!-- Here the default checkstyle rule restricts package 
name parts to
+                         seven characters, this is not in line with common 
practice at Google.
+                       -->
+                       <property name="format" 
value="^[a-z]+(\.[a-z][a-z0-9]{1,})*$"/>
+                       <property name="severity" value="error"/>
+               </module>
+
+               <module name="TypeNameCheck">
+                       <!-- Validates static, final fields against the
+                       expression "^[A-Z][a-zA-Z0-9]*$". -->
+                       <metadata name="altname" value="TypeName"/>
+                       <property name="severity" value="error"/>
+               </module>
+
+               <module name="ConstantNameCheck">
+                       <!-- Validates non-private, static, final fields 
against the supplied
+                       public/package final fields 
"^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$". -->
+                       <metadata name="altname" value="ConstantName"/>
+                       <property name="applyToPublic" value="true"/>
+                       <property name="applyToProtected" value="true"/>
+                       <property name="applyToPackage" value="true"/>
+                       <property name="applyToPrivate" value="false"/>
+                       <property name="format" 
value="^([A-Z][A-Z0-9]*(_[A-Z0-9]+)*|FLAG_.*)$"/>
+                       <message key="name.invalidPattern"
+                                        value="Variable ''{0}'' should be in 
ALL_CAPS (if it is a constant) or be private (otherwise)."/>
+                       <property name="severity" value="error"/>
+               </module>
+
+               <module name="StaticVariableNameCheck">
+                       <!-- Validates static, non-final fields against the 
supplied
+                       expression "^[a-z][a-zA-Z0-9]*_?$". -->
+                       <metadata name="altname" value="StaticVariableName"/>
+                       <property name="applyToPublic" value="true"/>
+                       <property name="applyToProtected" value="true"/>
+                       <property name="applyToPackage" value="true"/>
+                       <property name="applyToPrivate" value="true"/>
+                       <property name="format" value="^[a-z][a-zA-Z0-9]*_?$"/>
+                       <property name="severity" value="error"/>
+               </module>
+
+               <module name="MemberNameCheck">
+                       <!-- Validates non-static members against the supplied 
expression. -->
+                       <metadata name="altname" value="MemberName"/>
+                       <property name="applyToPublic" value="true"/>
+                       <property name="applyToProtected" value="true"/>
+                       <property name="applyToPackage" value="true"/>
+                       <property name="applyToPrivate" value="true"/>
+                       <property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
+                       <property name="severity" value="error"/>
+               </module>
+
+               <module name="MethodNameCheck">
+                       <!-- Validates identifiers for method names. -->
+                       <metadata name="altname" value="MethodName"/>
+                       <property name="format" 
value="^[a-z][a-zA-Z0-9]*(_[a-zA-Z0-9]+)*$"/>
+                       <property name="severity" value="error"/>
+               </module>
+
+               <module name="ParameterName">
+                       <!-- Validates identifiers for method parameters 
against the
+                         expression "^[a-z][a-zA-Z0-9]*$". -->
+                       <property name="severity" value="error"/>
+               </module>
+
+               <module name="LocalFinalVariableName">
+                       <!-- Validates identifiers for local final variables 
against the
+                         expression "^[a-z][a-zA-Z0-9]*$". -->
+                       <property name="severity" value="error"/>
+               </module>
+
+               <module name="LocalVariableName">
+                       <!-- Validates identifiers for local variables against 
the
+                         expression "^[a-z][a-zA-Z0-9]*$". -->
+                       <property name="severity" value="error"/>
+               </module>
+
+               <!--
+
+               LENGTH and CODING CHECKS
+
+               -->
+
+               <!-- Checks for braces around if and else blocks -->
+               <module name="NeedBraces">
+                       <property name="severity" value="error"/>
+                       <property name="tokens"
+                                         value="LITERAL_IF, LITERAL_ELSE, 
LITERAL_FOR, LITERAL_WHILE, LITERAL_DO"/>
+               </module>
+
+               <module name="UpperEll">
+                       <!-- Checks that long constants are defined with an 
upper ell.-->
+                       <property name="severity" value="error"/>
+               </module>
+
+               <module name="FallThrough">
+                       <!-- Warn about falling through to the next case 
statement.  Similar to
+                       javac -Xlint:fallthrough, but the check is suppressed 
if a single-line comment
+                       on the last non-blank line preceding the fallen-into 
case contains 'fall through' (or
+                       some other variants that we don't publicized to promote 
consistency).
+                       -->
+                       <property name="reliefPattern"
+                                         value="fall through|Fall 
through|fallthru|Fallthru|falls through|Falls 
through|fallthrough|Fallthrough|No break|NO break|no break|continue on"/>
+                       <property name="severity" value="error"/>
+               </module>
+
+               <!-- Checks for over-complicated boolean expressions. -->
+               <module name="SimplifyBooleanExpression"/>
+
+               <!-- Detects empty statements (standalone ";" semicolon). -->
+               <module name="EmptyStatement"/>
+
+               <!-- Detect multiple consecutive semicolons (e.g. ";;"). -->
+               <module name="RegexpSinglelineJava">
+                       <property name="format" value=";{2,}"/>
+                       <property name="message" value="Use one semicolon"/>
+                       <property name="ignoreComments" value="true"/>
+               </module>
+
+
+               <!--
+
+               WHITESPACE CHECKS
+
+               -->
+
+               <module name="EmptyLineSeparator">
+                       <!-- Checks for empty line separator between tokens. 
The only
+                                excluded token is VARIABLE_DEF, allowing class 
fields to
+                                be declared on consecutive lines.
+                       -->
+                       <property name="allowMultipleEmptyLines" value="false"/>
+                       <property 
name="allowMultipleEmptyLinesInsideClassMembers" value="false"/>
+                       <property name="tokens" value="PACKAGE_DEF, IMPORT, 
STATIC_IMPORT, CLASS_DEF,
+        INTERFACE_DEF, ENUM_DEF, STATIC_INIT, INSTANCE_INIT, METHOD_DEF,
+        CTOR_DEF"/>
+               </module>
+       </module>
+</module>
+
diff --git a/tools/maven/suppressions.xml b/tools/maven/suppressions.xml
new file mode 100644
index 0000000..b9a8c12
--- /dev/null
+++ b/tools/maven/suppressions.xml
@@ -0,0 +1,72 @@
+<?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
+               "-//Puppy Crawl//DTD Suppressions 1.1//EN"
+               "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd";>
+
+<suppressions>
+               <!-- Star import is used for all the expressions -->
+               <suppress files="BaseExpressions.java" 
checks="AvoidStarImport"/>
+
+               <!-- These use star import for all the generated Tuple classes 
-->
+               <suppress files="CsvReader.java" checks="AvoidStarImport"/>
+
+               <suppress files="NoticeFileChecker.java" checks="Regexp"/>
+               <suppress files="NoticeFileChecker.java" 
checks="IllegalImport"/>
+               <suppress files="NoticeFileCheckerTest.java" 
checks="IllegalImport"/>
+               <suppress files="DependencyTree.java" checks="IllegalImport"/>
+
+               <suppress files="FlinkSqlParserImplTest.java" 
checks="FileLength"/>
+               <suppress files="JoinOperator.java" checks="FileLength"/>
+               <suppress files="WindowOperatorTest.java" checks="FileLength"/>
+               <suppress files="WindowOperatorContractTest.java" 
checks="FileLength"/>
+               <suppress files="NFAITCase.java" checks="FileLength"/>
+               <suppress files="HyperLogLogPlusPlus.java" checks="FileLength"/>
+
+               <!-- Legacy mockito usages -->
+               <!-- Updated this suppress files section due to FLINK-36063, 
which migrated many classes from flink-streaming-java to flink-runtime. This 
allows runtime access to stream graph. -->
+               <suppress 
files="BufferDataOverWindowOperatorTest.java|CEPOperatorTest.java|CepRuntimeContextTest.java|CliFrontendListTest.java|CliFrontendPackageProgramTest.java|CliFrontendSavepointTest.java|DemultiplexingRecordDeserializerTest.java|DropwizardMeterWrapperTest.java|DynamicEventTimeSessionWindowsTest.java|DynamicProcessingTimeSessionWindowsTest.java|EmbeddedRocksDBStateBackendTest.java|EventTimeSessionWindowsTest.java|FlinkCalciteCatalogReaderTest.java|FlinkMeterWrapperTest.java|Hadoop
 [...]
+                                 checks="IllegalImport"/>
+
+               <suppress 
files="org[\\/]apache[\\/]flink[\\/]formats[\\/]avro[\\/]generated[\\/].*.java" 
checks="[a-zA-Z0-9]*"/>
+               <suppress 
files="org[\\/]apache[\\/]flink[\\/]formats[\\/]parquet[\\/]generated[\\/].*.java"
 checks="[a-zA-Z0-9]*"/>
+               <!-- Sometimes we have to temporarily fix very long, different 
formatted Calcite files. -->
+               <suppress files="org[\\/]apache[\\/]calcite.*" 
checks="[a-zA-Z0-9]*"/>
+
+               <!-- Temporarily fix TM Metaspace memory leak caused by Apache 
Beam sdk harness. -->
+               <suppress files="org[\\/]apache[\\/]beam.*.java" 
checks="[a-zA-Z0-9]*"/>
+
+           <!-- Have to use guava directly -->
+           <suppress
+                       
files="OverConvertRule.java|InConverter.java|SymbolUtil.java|RexNodeJsonDeserializer.java|RexNodeJsonSerializer.java|RexNodeJsonSerdeTest.java|FlinkAggregateProjectMergeRule.java|BatchPhysicalConstantTableFunctionScanRule.java|StreamPhysicalConstantTableFunctionScanRule.java|AggregateReduceGroupingRule.java"
+                       checks="IllegalImport"/>
+               <!-- Classes copied from AWS -->
+               <suppress
+                       
files="com[\\/]amazonaws[\\/]services[\\/]s3[\\/]model[\\/]transform[\\/]XmlResponsesSaxParser.java"
+                       checks=".*"/>
+               <!-- target directory is not relevant for checkstyle -->
+               <suppress
+                       files="[\\/]target[\\/]"
+                       checks=".*"/>
+               <!-- suppress check for copied hive code -->
+               <suppress 
files="org[\\/]apache[\\/]hadoop[\\/]hive[\\/].*.java" checks=".*"/>
+               <suppress 
files="org[\\/]apache[\\/]hive[\\/]service[\\/]rpc[\\/]thrift[\\/].*.java" 
checks=".*"/>
+</suppressions>

Reply via email to