ajantha-bhat commented on a change in pull request #3401: [CARBONDATA-3528] refactor java checkstyle rules
URL: https://github.com/apache/carbondata/pull/3401#discussion_r336885064 ########## File path: dev/javastyle-config.xml ########## @@ -42,132 +42,229 @@ --> <module name = "Checker"> - <property name="charset" value="UTF-8"/> - - <property name="severity" value="error"/> - - <property name="fileExtensions" value="java, properties, xml"/> - - <!-- Checks for whitespace --> - <!-- See http://checkstyle.sf.net/config_whitespace.html --> - <module name="FileTabCharacter"> - <property name="eachLine" value="true"/> - </module> - - <module name="RegexpSingleline"> - <!-- \s matches whitespace character, $ matches end of line. --> - <property name="format" value="\s+$"/> - <property name="message" value="No trailing whitespace allowed."/> - </module> - - <module name="Header"> - <property name="headerFile" value="${checkstyle.header.file}"/> - <property name="fileExtensions" value="java"/> - </module> - - <module name="TreeWalker"> - <module name="OuterTypeFilename"/> - <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> - <module name="AvoidEscapedUnicodeCharacters"> - <property name="allowEscapesForControlCharacters" value="true"/> - <property name="allowByTailComment" value="true"/> - <property name="allowNonPrintableEscapes" value="true"/> - </module> - <!-- TODO: 11/09/15 disabled - the lengths are currently > 100 in many places --> - - <module name="LineLength"> - <property name="max" value="100"/> - <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/> - </module> - - <module name="NoLineWrap"/> - <module name="EmptyBlock"> - <property name="option" value="TEXT"/> - <property name="tokens" value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/> - </module> - <module name="NeedBraces"> - <property name="allowSingleLineStatement" value="true"/> - </module> - <module name="OneStatementPerLine"/> - <module name="ArrayTypeStyle"/> - <module name="FallThrough"/> - <module name="UpperEll"/> - <module name="ModifierOrder"/> - <module name="SeparatorWrap"> - <property name="tokens" value="DOT"/> - <property name="option" value="nl"/> - </module> - <module name="SeparatorWrap"> - <property name="tokens" value="COMMA"/> - <property name="option" value="EOL"/> - </module> - <module name="PackageName"> - <property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/> - <message key="name.invalidPattern" - value="Package name ''{0}'' must match pattern ''{1}''."/> - </module> - <module name="ClassTypeParameterName"> - <property name="format" value="([A-Z][a-zA-Z0-9]*$)"/> - <message key="name.invalidPattern" - value="Class type name ''{0}'' must match pattern ''{1}''."/> - </module> - <module name="MethodTypeParameterName"> - <property name="format" value="([A-Z][a-zA-Z0-9]*)"/> - <message key="name.invalidPattern" - value="Method type name ''{0}'' must match pattern ''{1}''."/> - </module> - <module name="NoFinalizer"/> - <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> - <module name="Indentation"> - <property name="basicOffset" value="2"/> - <property name="braceAdjustment" value="0"/> - <property name="caseIndent" value="2"/> - <property name="throwsIndent" value="2"/> - <property name="lineWrappingIndentation" value="4"/> - <property name="arrayInitIndent" value="4"/> - </module> - - <!-- TODO: 11/09/15 disabled - order is currently wrong in many places --> - - <module name="ImportOrder"> - <property name="separated" value="true"/> - <!--<property name="ordered" value="true"/>--> - <property name="groups" value="/^javax?\./,org.apache.carbondata,*"/> - </module> - - <module name="MethodParamPad"/> - <module name="AnnotationLocation"> - <property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/> - </module> - <module name="AnnotationLocation"> - <property name="tokens" value="VARIABLE_DEF"/> - <property name="allowSamelineMultipleAnnotations" value="true"/> - </module> - <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> - <module name="EmptyCatchBlock"> - <property name="exceptionVariableName" value="expected"/> - </module> - <module name="CommentsIndentation"/> - <module name="UnusedImports"/> - - <module name="ParenPad"/> - <module name="WhitespaceAround"/> + <property name="charset" value="UTF-8"/> Review comment: can you add the new properties at the end ? cannot differentiate old and new. Now it shows both are modified. it should show only modified/added properties. Existing properties should not be deleted ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [hidden email] With regards, Apache Git Services |
Free forum by Nabble | Edit this page |