NihalJain commented on PR #2240: URL: https://github.com/apache/phoenix/pull/2240#issuecomment-3097357765
Also ran with following which is almost (not exactly) same as hbase's https://github.com/apache/hbase/blob/master/hbase-checkstyle/src/main/resources/hbase/checkstyle.xml for more perspective ``` <?xml version="1.0"?> <!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd" > <!-- /** * 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. */ ON MVN COMPILE NOT WORKING If you wondering why 'mvn compile' does not work building HBase (in particular, if you are doing it for the first time), instead do 'mvn package'. If you are interested in the full story, see https://issues.apache.org/jira/browse/HBASE-6795. --> <module name="Checker"> <!-- Filter out Checkstyle warnings that have been suppressed with the @SuppressWarnings annotation --> <module name="SuppressWarningsFilter"/> <module name="FileTabCharacter"/> <module name="TreeWalker"> <!-- Annotations Checks http://checkstyle.sourceforge.net/config_annotation.html --> <module name="MissingDeprecated"/> <!-- Block Checks http://checkstyle.sourceforge.net/config_blocks.html --> <module name="EmptyBlock"/> <module name="LeftCurly"/> <module name="NeedBraces"/> <!-- Class Design Checks http://checkstyle.sourceforge.net/config_design.html --> <module name="FinalClass"/> <module name="HideUtilityClassConstructor"/> <module name="InterfaceIsType"/> <module name="VisibilityModifier"> <property name="packageAllowed" value="true"/> <property name="protectedAllowed" value="true"/> <property name="allowPublicImmutableFields" value="true"/> </module> <!-- Coding Checks http://checkstyle.sourceforge.net/config_coding.html --> <module name="ArrayTypeStyle"/> <module name="EmptyStatement"/> <module name="EqualsHashCode"/> <module name="IllegalInstantiation"/> <module name="InnerAssignment"/> <module name="NoFinalizer"/> <!-- Import Checks http://checkstyle.sourceforge.net/config_imports.html --> <module name="AvoidStarImport"/> <module name="ImportOrder"> <property name="groups" value="*,org.apache.phoenix.thirdparty,org.apache.phoenix.shaded,org.apache.hbase.thirdparty,org.apache.hadoop.hbase.shaded"/> <property name="option" value="top" /> <property name="ordered" value="true"/> <property name="separated" value="true"/> <property name="sortStaticImportsAlphabetically" value="true"/> </module> <module name="RedundantImport"/> <module name="UnusedImports"> <property name="processJavadoc" value="true"/> </module> <!-- Javadoc Checks http://checkstyle.sourceforge.net/config_javadoc.html --> <module name="JavadocTagContinuationIndentation"> <property name="offset" value="2"/> </module> <module name="NonEmptyAtclauseDescription"/> <!-- Miscellaneous Checks http://checkstyle.sourceforge.net/config_misc.html --> <module name="UpperEll"/> <module name="Indentation"> <property name="basicOffset" value="2"/> <property name="caseIndent" value="2"/> <property name="throwsIndent" value="2"/> <property name="arrayInitIndent" value="2"/> <property name="lineWrappingIndentation" value="2"/> </module> <module name="MethodLength"/> <!-- Whitespace Checks http://checkstyle.sourceforge.net/config_whitespace.html --> <module name="MethodParamPad"/> <module name="ParenPad"/> <!-- Make the @SuppressWarnings annotations available to Checkstyle --> <module name="SuppressWarningsHolder"/> </module> <!-- Size Violation Checks http://checkstyle.sourceforge.net/config_sizes.html --> <module name="LineLength"> <property name="max" value="100"/> <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://|org.apache.thrift.|com.google.protobuf.|hbase.protobuf.generated"/> </module> </module> ``` Results: File: [fix_with_hbase_style.txt](https://github.com/user-attachments/files/21350790/fix_with_hbase_style.txt) ``` phoenix % grep 'There [are|is]' fix_with_hbase_style.txt [INFO] There are 2 errors reported by Checkstyle 9.3 with /Users/nihjain/code/os/phoenix/phoenix-hbase-compat-2.6.0/../src/main/config/checkstyle/checker.xml ruleset. [INFO] There are 2 errors reported by Checkstyle 9.3 with /Users/nihjain/code/os/phoenix/phoenix-hbase-compat-2.5.4/../src/main/config/checkstyle/checker.xml ruleset. [INFO] There are 2 errors reported by Checkstyle 9.3 with /Users/nihjain/code/os/phoenix/phoenix-hbase-compat-2.5.0/../src/main/config/checkstyle/checker.xml ruleset. [INFO] There are 2 errors reported by Checkstyle 9.3 with /Users/nihjain/code/os/phoenix/phoenix-hbase-compat-2.4.1/../src/main/config/checkstyle/checker.xml ruleset. [INFO] There are 1635 errors reported by Checkstyle 9.3 with /Users/nihjain/code/os/phoenix/phoenix-core-client/../src/main/config/checkstyle/checker.xml ruleset. [INFO] There are 212 errors reported by Checkstyle 9.3 with /Users/nihjain/code/os/phoenix/phoenix-core-server/../src/main/config/checkstyle/checker.xml ruleset. [INFO] There are 61 errors reported by Checkstyle 9.3 with /Users/nihjain/code/os/phoenix/phoenix-pherf/../src/main/config/checkstyle/checker.xml ruleset. [INFO] There is 1 error reported by Checkstyle 9.3 with /Users/nihjain/code/os/phoenix/phoenix-tracing-webapp/../src/main/config/checkstyle/checker.xml ruleset. ``` --- HBase seems to have a little restrictive ruleset like RedundantModifier, UnnecessaryParentheses, OperatorWrap etc are gone! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@phoenix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org