You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/04/12 15:54:37 UTC

[GitHub] [incubator-doris] jackwener opened a new issue, #8985: [Enhancement] Format existing code

jackwener opened a new issue, #8985:
URL: https://github.com/apache/incubator-doris/issues/8985

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Description
   
   Currently , there is so many code that isn't formatted. It will make the review hard.
   
   
   
   
   ### Solution
   
   The solution need to discuss. 
   
   - we can format all code at once.
   - we can format in batches, have priority to format the stable code.
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: commits-unsubscribe@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] jackwener commented on issue #8985: [Enhancement] Format existing code

Posted by GitBox <gi...@apache.org>.
jackwener commented on issue #8985:
URL: https://github.com/apache/incubator-doris/issues/8985#issuecomment-1101155224

   The first thing is we should add a standard `fe/checkstyle.xml`. Which is need more discuss about what do we need rules.


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] jackwener commented on issue #8985: [Enhancement] Format existing code

Posted by GitBox <gi...@apache.org>.
jackwener commented on issue #8985:
URL: https://github.com/apache/incubator-doris/issues/8985#issuecomment-1101204643

   This is [google_style checkstyle](https://checkstyle.sourceforge.io/google_style.html), which is worth learning from.
   
   


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morrySnow commented on issue #8985: [Enhancement] Format existing code

Posted by GitBox <gi...@apache.org>.
morrySnow commented on issue #8985:
URL: https://github.com/apache/incubator-doris/issues/8985#issuecomment-1113199907

   I want to add style checker to fe step by step.
   According to discussion in dev list, I'll do this in six steps.
   
   For detail, you could see:
   list thread: https://lists.apache.org/thread/yxjplc7v6sb0kzc9jxr1kl1xy2v8ctr3


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morrySnow commented on issue #8985: [Enhancement] Format existing code

Posted by GitBox <gi...@apache.org>.
morrySnow commented on issue #8985:
URL: https://github.com/apache/incubator-doris/issues/8985#issuecomment-1111214162

   I test some check style rules and collect impact from each rule:
   
   I've divided the rules into four categories, Level 0 to Level 2 are code rules, Level 0 is most Important. The last category is Java doc.
   
   # Level 0
   
   ## tab character in file
   
   > ```xml
   > <module name="FileTabCharacter">
   >     <property name="eachLine" value="true"/>
   > </module>
   > ```
   > ```plain text
   > files: 16
   > lines: 185
   > ```
   
   ## Merge conflicts unresolved
   
   > ```xml
   > <module name="RegexpSingleline">
   >   <property name="format" value="&gt;&gt;&gt;&gt;&gt;&gt;&gt;"/>
   >   <property name="message" value="Merge conflicts unresolved."/>
   > </module>
   > <module name="RegexpSingleline">
   >   <property name="format" value="&lt;&lt;&lt;&lt;&lt;&lt;&lt;"/>
   >   <property name="message" value="Merge conflicts unresolved."/>
   > </module>
   > ```
   > ```plain text
   > files: 0
   > lines: 0
   > ```
   
   ## Avoid using corresponding octal or Unicode escape
   
   > ```xml
   > <module name="IllegalTokenText">
   >   <property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
   >   <property name="format"
   >             value="\\u00(08|09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
   >   <property name="message" value="Avoid using corresponding octal or Unicode escape."/>
   > </module>
   > ```
   > ```plain text
   > files: 0
   > lines: 0
   > ```
   
   ## Avoid Escaped Unicode Characters
   
   > ```xml
   > <module name="AvoidEscapedUnicodeCharacters">
   >   <property name="allowEscapesForControlCharacters" value="true"/>
   >   <property name="allowByTailComment" value="true"/>
   >   <property name="allowNonPrintableEscapes" value="true"/>
   > </module>
   > ```
   > ```plain text
   > files: 0
   > lines: 0
   > ```
   
   ## One Top Level Class
   
   > ```xml
   > <module name="OneTopLevelClass"/>
   > ```
   > ```plain text
   > files: 0
   > lines: 0
   > ```
   
   ## No Line Wrap
   
   > ```xml
   > <module name="NoLineWrap"/>
   > ```
   > ```plain text
   > files: 0
   > lines: 0
   > ```
   
   ## Need Braces
   
   > ```xml
   > <module name="NeedBraces"/>
   > ```
   > ```plain text
   > files: 74
   > lines: 270
   > ```
   
   ## One Statement Per Line
   
   > ```xml
   > <module name="OneStatementPerLine"/>
   > ```
   > ```plain text
   > files: 8
   > lines: 14
   > ```
   
   ## Missing Switch Default
   
   > ```xml
   > <module name="MissingSwitchDefault"/>
   > ```
   > ```plain text
   > files: 21
   > lines: 44
   > ```
   
   ## Fall Through
   
   > ```xml
   > <module name="FallThrough"/>
   > ```
   > ```plain text
   > files: 11
   > lines: 23
   > ```
   
   ## Package Name
   
   > ```xml
   > <module name="PackageName">
   >   <!-- https://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html -->
   >   <property name="format" value="^[a-z]+(\.[a-z_][a-z0-9_]*)*$"/>
   >   <message key="name.invalidPattern"
   >            value="Package name ''{0}'' must match pattern ''{1}''."/>
   > </module>
   > ```
   > ```plain text
   > files: 0
   > lines: 0
   > ```
   
   ## No Finalizer
   
   > ```xml
   > <module name="NoFinalizer"/>
   > ```
   > ```plain text
   > files: 0
   > lines: 0
   > ```
   
   ## Custom Import Order
   
   > ```xml
   > <module name="CustomImportOrder">
   >   <property name="sortImportsInGroupAlphabetically" value="true"/>
   >   <property name="separateLineBetweenGroups" value="true"/>
   >   <property name="customImportOrderRules" value="STATIC###SAME_PACKAGE(3)###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE"/>
   >   <property name="tokens" value="IMPORT, STATIC_IMPORT, PACKAGE_DEF"/>
   > </module>
   > ```
   > ```plain text
   > files: 573
   > lines: 1413
   > ```
   
   ## Equals Hash Code
   
   > ```xml
   > <module name="EqualsHashCode"/>
   > ```
   > ```plain text
   > files: 70
   > lines: 71
   > ```
   
   # Level 1
   
   ## Line Length 120
   
   > ```xml
   > <module name="LineLength">
   >   <property name="max" value="120"/>
   >   <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
   > </module>
   > ```
   > ```plain text
   > files: 347
   > lines: 1788
   > ```
   
   ## Empty Block
   
   > ```xml
   > <module name="EmptyBlock">
   >   <property name="option" value="TEXT"/>
   >   <property name="tokens" value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF,
   >     LITERAL_ELSE, LITERAL_SWITCH"/>
   > </module>
   > ```
   > ```plain text
   > files: 15
   > lines: 26
   > ```
   
   ## Left Curly
   
   > ```xml
   > <module name="LeftCurly">
   >   <property name="tokens"
   >            value="ANNOTATION_DEF, CLASS_DEF, CTOR_DEF, ENUM_CONSTANT_DEF, ENUM_DEF,
   >                 INTERFACE_DEF, LAMBDA, LITERAL_CASE, LITERAL_CATCH, LITERAL_DEFAULT,
   >                 LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF,
   >                 LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, METHOD_DEF,
   >                 OBJBLOCK, STATIC_INIT, RECORD_DEF, COMPACT_CTOR_DEF"/>
   > </module>
   > ```
   > ```plain text
   > files: 62
   > lines: 227
   > ```
   
   ## Right Curly
   
   > ```xml
   >  <module name="RightCurly">
   >    <property name="option" value="same"/>
   >    <property name="tokens" value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY,
   >      LITERAL_IF, LITERAL_ELSE, LITERAL_DO"/>
   >  </module>
   > <module name="RightCurly">
   >   <property name="id" value="RightCurlyAlone"/>
   >   <property name="option" value="alone"/>
   >   <property name="tokens"
   >            value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT,
   >                 INSTANCE_INIT, ANNOTATION_DEF, ENUM_DEF, INTERFACE_DEF, RECORD_DEF,
   >                 COMPACT_CTOR_DEF"/>
   > </module>
   > <module name="SuppressionXpathSingleFilter">
   >   <!-- suppresion is required till https://github.com/checkstyle/checkstyle/issues/7541 -->
   >   <property name="id" value="RightCurlyAlone"/>
   >   <property name="query" value="//RCURLY[parent::SLIST[count(./*)=1]
   >                                  or preceding-sibling::*[last()][self::LCURLY]]"/>
   > </module>
   > ```
   > ```plain text
   > files: 72
   > lines: 293
   > ```
   
   ## White space Around
   
   > ```xml
   > <module name="WhitespaceAround">
   >   <property name="allowEmptyConstructors" value="true"/>
   >   <property name="allowEmptyLambdas" value="true"/>
   >   <property name="allowEmptyMethods" value="true"/>
   >   <property name="allowEmptyTypes" value="true"/>
   >   <property name="allowEmptyLoops" value="true"/>
   >   <property name="ignoreEnhancedForColon" value="false"/>
   >   <property name="tokens"
   >            value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR,
   >                 BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, DO_WHILE, EQUAL, GE, GT, LAMBDA, LAND,
   >                 LCURLY, LE, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY,
   >                 LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SWITCH, 
   > LITERAL_SYNCHRONIZED,
   >                 LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN,
   >                 NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, RCURLY, SL, SLIST, SL_ASSIGN, SR,
   >                 SR_ASSIGN, STAR, STAR_ASSIGN, LITERAL_ASSERT, TYPE_EXTENSION_AND"/>
   >   <message key="ws.notFollowed"
   >           value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may 
   > only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
   >   <message key="ws.notPreceded"
   >           value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
   > </module>
   > ```
   > ```plain text
   > files: 141
   > lines: 372
   > ```
   
   ## Type Name
   
   > ```xml
   > <module name="TypeName">
   >   <property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF,
   >                 ANNOTATION_DEF, RECORD_DEF"/>
   >   <message key="name.invalidPattern"
   >          value="Type name ''{0}'' must match pattern ''{1}''."/>
   > </module>
   > ```
   > ```plain text
   > files: 0
   > lines: 0
   > ```
   
   ## Member Name
   
   > ```xml
   > <module name="MemberName">
   >   <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
   >   <message key="name.invalidPattern"
   >            value="Member name ''{0}'' must match pattern ''{1}''."/>
   > </module>
   > ```
   > ```plain text
   > files: 48
   > lines: 156
   > ```
   
   ## Constant Name
   
   > ```xml
   > <module name="ConstantName"/>
   > ```
   > ```plain text
   > files: 25
   > lines: 33
   > ```
   
   ## Parameter Name
   
   > ```xml
   > <module name="ParameterName">
   >   <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
   >   <message key="name.invalidPattern"
   >          value="Parameter name ''{0}'' must match pattern ''{1}''."/>
   > </module>
   > ```
   > ```plain text
   > files: 36
   > lines: 55
   > ```
   
   ## LambdaParameterName
   
   > ```xml
   >  <module name="LambdaParameterName">
   >    <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
   >    <message key="name.invalidPattern"
   >           value="Lambda parameter name ''{0}'' must match pattern ''{1}''."/>
   >  </module>
   > ```
   > ```plain text
   > files: 2
   > lines: 4
   > ```
   
   ## CatchParameterName
   
   > ```xml
   >  <module name="CatchParameterName">
   >    <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
   >    <message key="name.invalidPattern"
   >           value="Catch parameter name ''{0}'' must match pattern ''{1}''."/>
   >  </module>
   > ```
   > ```plain text
   > files: 0
   > lines: 0
   > ```
   
   ## Local Variable Name
   
   > ```xml
   > <module name="LocalVariableName">
   >   <property name="tokens" value="VARIABLE_DEF"/>
   >   <property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
   >   <property name="allowOneCharVarInForLoop" value="true"/>
   >   <message key="name.invalidPattern"
   >            value="Local variable name ''{0}'' must match pattern ''{1}''."/>
   > </module>
   > ```
   > ```plain text
   > files: 15
   > lines: 28
   > ```
   
   ## Pattern Variable Name
   
   > ```xml
   > <module name="PatternVariableName">
   >   <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
   >   <message key="name.invalidPattern"
   >          value="Pattern variable name ''{0}'' must match pattern ''{1}''."/>
   > </module>
   > ```
   > ```plain text
   > files: 0
   > lines: 0
   > ```
   
   ## Record Component Name
   
   > ```xml
   > <module name="RecordComponentName">
   >   <property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
   >   <message key="name.invalidPattern"
   >            value="Record component name ''{0}'' must match pattern ''{1}''."/>
   > </module>
   > ```
   > ```plain text
   > files: 0
   > lines: 0
   > ```
   
   ## Record Type Parameter Name
   
   > ```xml
   > <module name="RecordTypeParameterName">
   >   <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*$)"/>
   >   <message key="name.invalidPattern"
   >            value="Record type name ''{0}'' must match pattern ''{1}''."/>
   > </module>
   > ```
   > ```plain text
   > files: 0
   > lines: 0
   > ```
   
   ## Class Type Parameter Name
   
   > ```xml
   > <module name="ClassTypeParameterName">
   >   <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*$)"/>
   >   <message key="name.invalidPattern"
   >            value="Class type name ''{0}'' must match pattern ''{1}''."/>
   > </module>
   > ```
   > ```plain text
   > files: 1
   > lines: 1
   > ```
   
   ## Method Type Parameter Name
   
   > ```xml
   > <module name="MethodTypeParameterName">
   >   <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*$)"/>
   >   <message key="name.invalidPattern"
   >            value="Method type name ''{0}'' must match pattern ''{1}''."/>
   > </module>
   > ```
   > ```plain text
   > files: 0
   > lines: 0
   > ```
   
   ## Interface Type Parameter Name
   
   > ```xml
   > <module name="InterfaceTypeParameterName">
   >   <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*$)"/>
   >   <message key="name.invalidPattern"
   >          value="Interface type name ''{0}'' must match pattern ''{1}''."/>
   > </module>
   > ```
   > ```plain text
   > files: 
   > lines: 
   > ```
   
   ## Generic Whitespace
   
   > ```xml
   > <module name="GenericWhitespace">
   >   <message key="ws.followed"
   >            value="GenericWhitespace ''{0}'' is followed by whitespace."/>
   >   <message key="ws.preceded"
   >            value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
   >   <message key="ws.illegalFollow"
   >            value="GenericWhitespace ''{0}'' should followed by whitespace."/>
   >   <message key="ws.notPreceded"
   >            value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
   > </module>
   > ```
   > ```plain text
   > files: 4
   > lines: 9
   > ```
   
   ## Indentation
   
   > ```xml
   > <module name="Indentation">
   >   <property name="basicOffset" value="4"/>
   >   <property name="braceAdjustment" value="4"/>
   >   <property name="caseIndent" value="4"/>
   >   <property name="throwsIndent" value="8"/>
   >   <property name="lineWrappingIndentation" value="8"/>
   >   <property name="arrayInitIndent" value="4"/>
   > </module>
   > ```
   > ```plain text
   > files: 103
   > lines: 754
   > ```
   
   ## Abbreviation As Word In Name
   
   > ```xml
   > <module name="AbbreviationAsWordInName">
   >   <property name="ignoreFinal" value="false"/>
   >   <property name="allowedAbbreviationLength" value="0"/>
   >   <property name="tokens"
   >            value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, ANNOTATION_DEF, ANNOTATION_FIELD_DEF
   >                 PARAMETER_DEF, VARIABLE_DEF, METHOD_DEF, PATTERN_VARIABLE_DEF, RECORD_DEF,
   >                 RECORD_COMPONENT_DEF"/>
   > </module>
   > ```
   > ```plain text
   > files: 0
   > lines: 0
   > ```
   
   ## No Whitespace Before Case Default Colon
   
   > ```xml
   > <module name="NoWhitespaceBeforeCaseDefaultColon"/>
   > ```
   > ```plain text
   > files: 2
   > lines: 3
   > ```
   
   ## Method Param Pad
   
   > ```xml
   > <module name="MethodParamPad">
   >   <property name="tokens"
   >            value="CTOR_DEF, LITERAL_NEW, METHOD_CALL, METHOD_DEF,
   >                 SUPER_CTOR_CALL, ENUM_CONSTANT_DEF, RECORD_DEF"/>
   > </module>
   > ```
   > ```plain text
   > files: 6
   > lines: 6
   > ```
   
   ## Whitespace
   
   > ```xml
   > <module name="NoWhitespaceBefore">
   >   <property name="tokens"
   >            value="COMMA, SEMI, POST_INC, POST_DEC, DOT,
   >                 LABELED_STAT, METHOD_REF"/>
   >   <property name="allowLineBreaks" value="true"/>
   > </module>
   > <module name="NoWhitespaceAfter">
   >   <property name="tokens" value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS"/>
   >   <property name="severity" value="error"/>
   > </module>
   > <module name="WhitespaceAfter"/>
   > ```
   > ```plain text
   > files: 125
   > lines: 284
   > ```
   
   ## Paren Pad
   
   > ```xml
   > <module name="ParenPad">
   >   <property name="tokens"
   >            value="ANNOTATION, ANNOTATION_FIELD_DEF, CTOR_CALL, CTOR_DEF, DOT, ENUM_CONSTANT_DEF,
   >                 EXPR, LITERAL_CATCH, LITERAL_DO, LITERAL_FOR, LITERAL_IF, LITERAL_NEW,
   >                 LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_WHILE, METHOD_CALL,
   >                 METHOD_DEF, QUESTION, RESOURCE_SPECIFICATION, SUPER_CTOR_CALL, LAMBDA,
   >                 RECORD_DEF"/>
   > </module>
   > ```
   > ```plain text
   > files: 13
   > lines: 15
   > ```
   
   ## Operator Wrap
   
   > ```xml
   > <module name="OperatorWrap">
   >   <property name="option" value="NL"/>
   >   <property name="tokens"
   >            value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR,
   >                 LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR, METHOD_REF,
   >                 TYPE_EXTENSION_AND "/>
   > </module>
   > ```
   > ```plain text
   > files: 151
   > lines: 1189
   > ```
   
   ## Static Variable Name
   
   > ```xml
   > <module name="StaticVariableName">
   >   <property name="format" value="^[A-Z][a-zA-Z0-9]*$"/>
   >   <message key="name.invalidPattern"
   >            value="Static member name ''{0}'' must match pattern ''{1}''."/>
   > </module>
   > ```
   > ```plain text
   > files: 91
   > lines: 531
   > ```
   
   ## Method Name
   
   > ```xml
   > <module name="MethodName">
   >   <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
   >   <message key="name.invalidPattern"
   >          value="Method name ''{0}'' must match pattern ''{1}''."/>
   > </module>
   > ```
   > ```plain text
   > files: 5
   > lines: 5
   > ```
   
   ## Newline At End Of File
   
   > ```xml
   >  <module name="NewlineAtEndOfFile">
   >    <property name="lineSeparator" value="lf"/>
   >  </module>
   > ```
   > ```plain text
   > files: 71
   > lines: 71
   > ```
   
   ## Trailing whitespace found
   
   > ```xml
   > <module name="RegexpSingleline">
   >   <property name="format" value="\s+$"/>
   >   <property name="message" value="Trailing whitespace found."/>
   >   <property name="fileExtensions" value=".java"/>
   > </module>
   > ```
   > ```plain text
   > files: 315
   > lines: 1336
   > ```
   
   # Level 2
   
   ## Extra newline
   
   > ```xml
   > <module name="RegexpMultiline">
   >   <property name="format" value="\n{3}"/>
   >   <property name="fileExtensions" value=".java"/>
   >   <property name="message" value="Extra newline"/>
   > </module>
   > ```
   > ```plain text
   > files: 152
   > lines: 215
   > ```
   
   ## Extra newline at end of block
   
   > ```xml
   > <module name="RegexpMultiline">
   >   <property name="format" value="\n\s*\n\s*}"/>
   >   <property name="fileExtensions" value=".java"/>
   >   <property name="message" value="Extra newline at end of block"/>
   > </module>
   > ```
   > ```plain text
   > files: 311
   > lines: 400
   > ```
   
   ## Empty Statement
   
   > ```xml
   > <module name="EmptyStatement"/>
   > ```
   > ```plain text
   > files: 7
   > lines: 8
   > ```
   
   ## Multiple Variable Declarations
   
   > ```xml
   > <module name="MultipleVariableDeclarations"/>
   > ```
   > ```plain text
   > files: 1
   > lines: 1
   > ```
   
   ## Array Type Style
   
   > ```xml
   > <module name="ArrayTypeStyle"/>
   > ```
   > ```plain text
   > files: 11
   > lines: 21
   > ```
   
   ## Upper Ell
   
   > ```xml
   > <module name="UpperEll"/>
   > ```
   > ```plain text
   > files: 6
   > lines: 7
   > ```
   
   ## Modifier Order
   
   > ```xml
   > <module name="ModifierOrder"/>
   > ```
   > ```plain text
   > files: 81
   > lines: 143
   > ```
   
   ## Empty Line Separator
   
   > ```xml
   > <module name="EmptyLineSeparator">
   >   <property name="tokens"
   >            value="PACKAGE_DEF, IMPORT, STATIC_IMPORT, CLASS_DEF, INTERFACE_DEF, ENUM_DEF,
   >                 STATIC_INIT, INSTANCE_INIT, METHOD_DEF, CTOR_DEF, VARIABLE_DEF, RECORD_DEF,
   >                 COMPACT_CTOR_DEF"/>
   >   <property name="allowNoEmptyLineBetweenFields" value="true"/>
   > </module>
   > ```
   > ```plain text
   > files: 129
   > lines: 317
   > ```
   
   ## Separator Wrap
   
   > ```xml
   > <module name="SeparatorWrap">
   >   <property name="id" value="SeparatorWrapDot"/>
   >   <property name="tokens" value="DOT"/>
   >   <property name="option" value="nl"/>
   > </module>
   > <module name="SeparatorWrap">
   >   <property name="id" value="SeparatorWrapComma"/>
   >   <property name="tokens" value="COMMA"/>
   >   <property name="option" value="EOL"/>
   > </module>
   > <module name="SeparatorWrap">
   >   <!-- ELLIPSIS is EOL until https://github.com/google/styleguide/issues/259 -->
   >   <property name="id" value="SeparatorWrapEllipsis"/>
   >   <property name="tokens" value="ELLIPSIS"/>
   >   <property name="option" value="EOL"/>
   > </module>
   > <module name="SeparatorWrap">
   >   <!-- ARRAY_DECLARATOR is EOL until https://github.com/google/styleguide/issues/258 -->
   >   <property name="id" value="SeparatorWrapArrayDeclarator"/>
   >   <property name="tokens" value="ARRAY_DECLARATOR"/>
   >   <property name="option" value="EOL"/>
   > </module>
   > <module name="SeparatorWrap">
   >   <property name="id" value="SeparatorWrapMethodRef"/>
   >   <property name="tokens" value="METHOD_REF"/>
   >   <property name="option" value="nl"/>
   > </module>
   > ```
   > ```plain text
   > files: 17
   > lines: 18
   > ```
   
   ## Overload Methods Declaration Order
   
   > ```xml
   > <module name="OverloadMethodsDeclarationOrder"/>
   > ```
   > ```plain text
   > files: 30
   > lines: 50
   > ```
   
   ## Variable Declaration Usage Distance
   
   > ```xml
   > <module name="VariableDeclarationUsageDistance"/>
   > ```
   > ```plain text
   > files: 79
   > lines: 140
   > ```
   
   ## Annotation Location
   
   > ```xml
   > <module name="AnnotationLocation">
   >   <property name="id" value="AnnotationLocationMostCases"/>
   >   <property name="tokens"
   >            value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF,
   >                   RECORD_DEF, COMPACT_CTOR_DEF"/>
   > </module>
   > <module name="AnnotationLocation">
   >   <property name="id" value="AnnotationLocationVariables"/>
   >   <property name="tokens" value="VARIABLE_DEF"/>
   >   <property name="allowSamelineMultipleAnnotations" value="true"/>
   > </module>
   > ```
   > ```plain text
   > files: 0
   > lines: 0
   > ```
   
   ## keyword this is not needed
   
   > ```xml
   > <module name="RegexpSinglelineJava">
   >   <property name="format" value="^\s*this\."/>
   >   <property name="message" value="keyword this is not needed"/>
   > </module>
   > ```
   > ```plain text
   > files: 898
   > lines: 5086
   > ```
   
   ## Empty Catch Block
   
   > ```xml
   > <module name="EmptyCatchBlock">
   >   <property name="exceptionVariableName" value="expected"/>
   > </module>
   > ```
   > ```plain text
   > files: 10
   > lines: 19
   > ```
   
   ## Comments Indentation
   
   > ```xml
   > <module name="CommentsIndentation">
   >   <property name="tokens" value="SINGLE_LINE_COMMENT, BLOCK_COMMENT_BEGIN"/>
   > </module>
   > ```
   > ```plain text
   > files: 20
   > lines: 29
   > ```
   
   # Java Doc
   
   ## Missing Deprecated
   
   > ```xml
   > <module name="MissingDeprecated">
   >   <property name="violateExecutionOnNonTightHtml" value="false"/>
   > </module>
   > ```
   
   ## Java Doc @xxx do not need period at the end
   
   > ```xml
   > <module name="RegexpSingleline">
   >   <property name="format" value="@throw.*\.$"/>
   >   <property name="message" value="Period is not needed at the end of the @throw tag."/>
   >   <property name="fileExtensions" value=".java"/>
   > </module>
   > <module name="RegexpSingleline">
   >   <property name="format" value="@return.*\.$"/>
   >   <property name="message" value="Period is not needed at the end of the @return tag."/>
   >   <property name="fileExtensions" value=".java"/>
   > </module>
   > <module name="RegexpSingleline">
   >   <property name="format" value="@param.*\.$"/>
   >   <property name="message" value="Period is not needed at the end of the @param tag."/>
   >   <property name="fileExtensions" value=".java"/>
   > </module>
   > ```
   
   ## TODO with author
   
   > ```xml
   > <module name="RegexpSingleline">
   >   <property name="format" value="TODO[^\(]"/>
   >   <property name="message" value="TODO must be annotated with the author in the format TODO(author)"
   > />
   >   <property name="fileExtensions" value=".java"/>
   > </module>
   > ```
   
   ## Javadoc Method
   
   > ```xml
   > <module name="MissingJavadocMethod">
   >   <property name="scope" value="public"/>
   >   <property name="minLineCount" value="2"/>
   >   <property name="allowedAnnotations" value="Override, Test"/>
   >   <property name="tokens" value="METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF,
   >                                COMPACT_CTOR_DEF"/>
   > </module>
   > <module name="JavadocMethod">
   >   <property name="accessModifiers" value="public"/>
   >   <property name="allowMissingParamTags" value="true"/>
   >   <property name="allowMissingReturnTag" value="true"/>
   >   <property name="allowedAnnotations" value="Override, Test"/>
   >   <property name="tokens" value="METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF, COMPACT_CTOR_DEF"/>
   > </module>
   > ```
   
   ## Javadoc Type
   
   > ```xml
   > <module name="MissingJavadocType">
   >   <property name="scope" value="protected"/>
   >   <property name="tokens"
   >             value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF,
   >                   RECORD_DEF, ANNOTATION_DEF"/>
   >   <property name="excludeScope" value="nothing"/>
   > </module>
   > <module name="JavadocType">
   >   <property name="id" value="ProductionScope"/>
   >   <property name="scope" value="public"/>
   > </module>
   > ```
   
   ## Checks that Javadoc is properly formatted
   
   > ```xml
   > <module name="JavadocStyle"/>
   > <module name="SingleLineJavadoc"/>
   > ```
   
   ## Atclause Order
   
   > ```xml
   > <module name="AtclauseOrder">
   >   <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>
   > ```
   
   ## NonEmptyAtclauseDescription
   
   > ```xml
   ><module name="NonEmptyAtclauseDescription"/>
   > ```
   
   ## InvalidJavadocPosition
   
   > ```xml
   > <module name="InvalidJavadocPosition"/>
   > ```
   
   ## JavadocTagContinuationIndentation
   
   > ```xml
   > <module name="JavadocTagContinuationIndentation"/>
   > ```
   
   ## SummaryJavadoc
   
   > ```xml
   > <module name="SummaryJavadoc">
   >   <property name="forbiddenSummaryFragments"
   >            value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
   > </module>
   > ```
   
   ## JavadocParagraph
   
   > ```xml
   > <module name="JavadocParagraph"/>
   > ```
   
   ## RequireEmptyLineBeforeBlockTagGroup
   
   > ```xml
   > <module name="RequireEmptyLineBeforeBlockTagGroup"/>
   > ```
   
   


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] jackwener commented on issue #8985: [Enhancement] Format existing code

Posted by GitBox <gi...@apache.org>.
jackwener commented on issue #8985:
URL: https://github.com/apache/incubator-doris/issues/8985#issuecomment-1101521859

   We can find the latest update time in [fe dir link](https://github.com/apache/incubator-doris/tree/master/fe/fe-core/src/main/java/org/apache/doris)
   
   - [consistency](https://github.com/apache/incubator-doris/tree/master/fe/fe-core/src/main/java/org/apache/doris/consistency)
   - [plugin](https://github.com/apache/incubator-doris/tree/master/fe/fe-core/src/main/java/org/apache/doris/plugin)
   - [metric](https://github.com/apache/incubator-doris/tree/master/fe/fe-core/src/main/java/org/apache/doris/metric)
   - [ldap](https://github.com/apache/incubator-doris/tree/master/fe/fe-core/src/main/java/org/apache/doris/ldap)
   - [ha](https://github.com/apache/incubator-doris/tree/master/fe/fe-core/src/main/java/org/apache/doris/ha)
   - [resource](https://github.com/apache/incubator-doris/tree/master/fe/fe-core/src/main/java/org/apache/doris/resource)
   - [rpc](https://github.com/apache/incubator-doris/tree/master/fe/fe-core/src/main/java/org/apache/doris/rpc)
   
   
   Those directory are over two months without an update. (except statistics because there is PR in [statistics](https://github.com/apache/incubator-doris/tree/master/fe/fe-core/src/main/java/org/apache/doris/statistics) 
   
   
   


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] jackwener closed issue #8985: [Enhancement] Format existing code

Posted by GitBox <gi...@apache.org>.
jackwener closed issue #8985: [Enhancement] Format existing code
URL: https://github.com/apache/doris/issues/8985


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] jackwener commented on issue #8985: [Enhancement] Format existing code

Posted by GitBox <gi...@apache.org>.
jackwener commented on issue #8985:
URL: https://github.com/apache/incubator-doris/issues/8985#issuecomment-1101198854

   From doris dev group, 
   > Great! But I think maybe we should list all rules in a some place and checked by every one care about it before we merge it to ensure the new code style is good enough.
   
   We should **list all rules** in this issues. All people who cares about `format rule` can put up your though.
   
   - redundant header from #9072
   


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org