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

exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-api.git


The following commit(s) were added to refs/heads/main by this push:
     new 01a79e3  NIFI-15926 Aligned API Checkstyle configuration with primary 
configuration (#87)
01a79e3 is described below

commit 01a79e3bd3734808a20a054f34e56ce0fda5f3bd
Author: dan-s1 <[email protected]>
AuthorDate: Tue May 19 14:48:59 2026 -0400

    NIFI-15926 Aligned API Checkstyle configuration with primary configuration 
(#87)
    
    Signed-off-by: David Handermann <[email protected]>
---
 checkstyle-suppressions.xml | 20 ++++++++++++++++++++
 checkstyle.xml              | 22 +++++++++++++++++++++-
 pom.xml                     |  1 +
 3 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml
new file mode 100644
index 0000000..b0e08b0
--- /dev/null
+++ b/checkstyle-suppressions.xml
@@ -0,0 +1,20 @@
+<?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>
+    <!-- In test files, suppress the strict MethodName rule (no underscores) 
and only apply the lenient one -->
+    <suppress files="[\\/]src[\\/]test[\\/].*" id="MethodNameRegular"/>
+    <!-- In main files, suppress the lenient MethodName rule (allows 
underscores) and only apply the strict one -->
+    <suppress files="[\\/]src[\\/]main[\\/].*" id="MethodNameTest"/>
+</suppressions>
diff --git a/checkstyle.xml b/checkstyle.xml
index ededf31..ee8f784 100644
--- a/checkstyle.xml
+++ b/checkstyle.xml
@@ -15,6 +15,10 @@
 <module name="Checker">
     <property name="charset" value="UTF-8"/>
     <property name="severity" value="warning"/>
+    <module name="SuppressionFilter">
+        <property name="file" value="${checkstyle.suppressions.file}"/>
+        <property name="optional" value="true"/>
+    </module>
     <!-- Checks for whitespace -->
     <!-- See http://checkstyle.sf.net/config_whitespace.html -->
     <module name="FileTabCharacter">
@@ -48,7 +52,7 @@
             <property name="processJavadoc" value="true"/>
         </module>
         <module name="CustomImportOrder">
-            <property name="customImportOrderRules" 
value="THIRD_PARTY_PACKAGE###SPECIAL_IMPORTS###STANDARD_JAVA_PACKAGE###STATIC"/>
+            <property name="customImportOrderRules" 
value="THIRD_PARTY_PACKAGE,SPECIAL_IMPORTS,STANDARD_JAVA_PACKAGE,STATIC"/>
             <property name="sortImportsInGroupAlphabetically" value="true"/>
             <property name="separateLineBetweenGroups" value="true"/>
             <property name="standardPackageRegExp" value="^(java|javax)\."/>
@@ -74,6 +78,20 @@
         <module name="MethodTypeParameterName">
             <property name="format" 
value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
         </module>
+        <module name="MethodName">
+            <property name="id" value="MethodNameRegular"/>
+            <property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
+        </module>
+        <module name="MethodName">
+            <property name="id" value="MethodNameTest"/>
+            <property name="format" value="^[a-z][a-zA-Z0-9_]*$"/>
+        </module>
+        <module name="LocalFinalVariableName"/>
+        <module name="LocalVariableName"/>
+        <module name="MemberName"/>
+        <module name="ParameterName"/>
+        <module name="StaticVariableName"/>
+        <module name="TypeName"/>
         <module name="MethodParamPad"/>
         <module name="OperatorWrap">
             <property name="option" value="NL"/>
@@ -130,5 +148,7 @@
         <module name="GenericWhitespace"/>
         <module name="ParenPad"/>
         <module name="TypecastParenPad"/>
+        <module name="UnusedLocalVariable"/>
+        <module name="InnerAssignment"/>
     </module>
 </module>
diff --git a/pom.xml b/pom.xml
index 2e7ee1a..6869056 100644
--- a/pom.xml
+++ b/pom.xml
@@ -198,6 +198,7 @@
                 <artifactId>maven-checkstyle-plugin</artifactId>
                 <configuration>
                     <configLocation>checkstyle.xml</configLocation>
+                    
<suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
                     
<includeTestSourceDirectory>true</includeTestSourceDirectory>
                 </configuration>
                 <executions>

Reply via email to