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

shaofengshi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git


The following commit(s) were added to refs/heads/master by this push:
     new f42e937  KYLIN-3602 Enable more checkstyle rules
f42e937 is described below

commit f42e937a2e968f94d8484f7bdafa7a86903eaa58
Author: Yichen Zhou <zhouy...@gmail.com>
AuthorDate: Sat Sep 29 14:28:17 2018 +0800

    KYLIN-3602 Enable more checkstyle rules
---
 dev-support/checkstyle-suppressions.xml | 36 +++++++++++++++++++++++++++++++++
 dev-support/checkstyle.xml              | 29 ++++++++++++++++++++++++++
 2 files changed, 65 insertions(+)

diff --git a/dev-support/checkstyle-suppressions.xml 
b/dev-support/checkstyle-suppressions.xml
index 06de625..f110b7c 100644
--- a/dev-support/checkstyle-suppressions.xml
+++ b/dev-support/checkstyle-suppressions.xml
@@ -25,4 +25,40 @@
     <suppress checks="." files=".*[/\\]generated[/\\].*\.java"/>
     <suppress checks="." 
files=".*[/\\]org[/\\]apache[/\\]calcite[/\\].*\.java"/>
     <suppress checks="MagicNumberCheck" files=".*Test\.java"/>
+
+    <!--
+    /* Temporary Suppressions
+     * The following files should be removed the suppression list after their 
checkstyle errors are fixed.
+     */
+    -->
+    <suppress checks="." files=".*[/\\]metadata[/\\].*\.java"/>
+
+    <suppress checks="LocalVariableName" files=".*Test\.java"/>
+    <suppress checks="LocalVariableName"
+              
files="(KylinConfig|BytesUtil|SSHClient|CuboidRecommender|AggregationGroup|FunctionRule|CubingUtils|CalculateStatsFromBaseCuboidJob|KafkaInputFormati|DeployUtil|BuildCubeWithEngine|KafkaInputFormat).java"/>
+    <suppress checks="LocalVariableName"
+              
files="(ExtractDictionaryFromGlobalJob|FactDistinctColumnsJob|UHCDictionaryJob|SparkExecutable|UnitTestSupport|AccessService|QueryService|AclEvaluate|MrJobInfoExtractor|CubeDescCreator).java"/>
+
+    <suppress checks="LocalFinalVariableName"
+              files="(StorageCleanupJob|DeployUtil).java"/>
+
+    <suppress checks="IllegalImport"
+              files="Bytes.java"/>
+
+    <suppress checks="MemberName" files=".*Test\.java"/>
+    <suppress checks="MemberName"
+              
files="(TrieDictionaryBuilder|SparkFactDistinct|GTScannerBenchmark|TableMetaStub|JobInstance|DimCountDistinctCounter|ColumnMeta|ColumnMetaWithType|TableMeta|BlockingReservoir|RecordEventTimeDetail|HiveProducer|HBaseScannerBenchmark|AppendDictNode|GTScannerBenchmark2).java"/>
+
+    <suppress checks="TypeName"
+              files="ColumnMetaWithType.java"/>
+
+    <suppress checks="BooleanExpressionComplexity"
+              files="(Bytes|Number2BytesConverter|CubeService).java"/>
+
+    <suppress checks="ParameterNumber"
+              
files="(QueryContext|GTScanRequest|HiveTableMeta|KylinMeta).java"/>
+
+    <suppress checks="OneStatementPerLine"
+              files="UHCDictionaryReducer.java"/>
+
 </suppressions>
diff --git a/dev-support/checkstyle.xml b/dev-support/checkstyle.xml
index 45325bf..d8eb73f 100644
--- a/dev-support/checkstyle.xml
+++ b/dev-support/checkstyle.xml
@@ -28,11 +28,31 @@
     <module name="FileTabCharacter"/>
     <module name="SuppressWarningsFilter"/>
     <module name="TreeWalker">
+
+        <!-- Checks for Naming Conventions.                  -->
+        <!-- See http://checkstyle.sf.net/config_naming.html -->
+        <!-- <module name="ConstantName"/> -->
+        <module name="LocalVariableName"/>
+        <module name="LocalFinalVariableName">
+            <property name="format" value="^[a-zA-Z0-9]*$$"/>
+        </module>
+        <module name="MemberName"/>
+        <!-- <module name="MethodName"/> -->
+        <!-- <module name="ParameterName"/> -->
+        <!-- <module name="StaticVariableName"/> -->
+        <module name="TypeName"/>
+
         <module name="AvoidStarImport"/>
+        <module name="IllegalImport"/>
         <module name="RedundantImport"/>
         <module name="UnusedImports">
             <property name="processJavadoc" value="true"/>
         </module>
+        <!-- <module name="SimplifyBooleanExpression"/> -->
+        <module name="OneStatementPerLine"/>
+        <!-- <module name="SimplifyBooleanReturn"/> -->
+
+        <!-- code quality -->
         <module name="LineLength">
             <property name="max" value="1000"/>
             <property name="ignorePattern"
@@ -40,6 +60,15 @@
         </module>
         <module name="MethodLength"/>
         <module name="MethodParamPad"/>
+        <module name="ParameterNumber">
+            <!-- default is 8 -->
+            <property name="max" value="12"/>
+        </module>
+        <module name="BooleanExpressionComplexity">
+            <!-- default is 3 -->
+            <property name="max" value="5"/>
+        </module>
+
         <module name="ParenPad"/>
         <module name="EmptyStatement"/>
         <module name="EmptyBlock">

Reply via email to