[GitHub] [carbondata] lamber-ken edited a comment on issue #3401: [CARBONDATA-3528] refactor java checkstyle rules

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] lamber-ken edited a comment on issue #3401: [CARBONDATA-3528] refactor java checkstyle rules

GitBox
lamber-ken edited a comment on issue #3401: [CARBONDATA-3528] refactor java checkstyle rules
URL: https://github.com/apache/carbondata/pull/3401#issuecomment-544375668
 
 
   > @lamber-ken :
   > Please update the description and I have some questions ?
   >
   > 1. Why this change now ? what is the problem with current check style ? these new rules are taken from which reference or project ?
   > 2. Why only java checkstyle modification ? why not scala check style also ?
   > 3. After adding these rules ? no issues found in carbon ?
   
   hi, @ajantha-bhat,
   
   1. This issus just fucus on java checkstyle, it's a big work to refactor java checkstyle already, scala checkstyle needs a new thread to refactor.
   2. These new rules are not taken from which reference or project.
   3. Current, the severity property of these new rules is info level, so it will not affect the build.
   
   And some new rules, for example bellow, you can check rulues by `mvn org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check`.
   
   #### RedundantImport (org.apache.carbondata.core.scan.expression.MatchExpression)
   ```
   import org.apache.carbondata.common.annotations.InterfaceAudience;
   import org.apache.carbondata.core.metadata.datatype.DataTypes;
   import org.apache.carbondata.core.scan.expression.Expression;
   import org.apache.carbondata.core.scan.expression.ExpressionResult;
   import org.apache.carbondata.core.scan.expression.exception.FilterIllegalMemberException;
   import org.apache.carbondata.core.scan.expression.exception.FilterUnsupportedException;
   import org.apache.carbondata.core.scan.filter.intf.ExpressionType;
   import org.apache.carbondata.core.scan.filter.intf.RowIntf;
   ```
   
   #### @Override (org.apache.carbondata.datamap.PreAggregateDataMapProvider)
   ```
   @Override
   public boolean supportRebuild() {
     return false;
   }
   
   @Override public boolean rebuildInternal(String newLoadName, Map<String, List<String>> segmentMap,
       CarbonTable carbonTable) {
     return false;
   }
   ```
   
   #### AvoidStarImport (org.apache.carbondata.tool.DataSummary)
   ```
   import java.io.File;
   import java.io.IOException;
   import java.nio.charset.Charset;
   import java.util.*;
   ```
   
   #### EmptyStatement (org.apache.carbondata.datamap.lucene.LuceneDataMapFactoryBase)
   ```
   // validate DataMapSchema and get index columns
   indexedCarbonColumns =  carbonTable.getIndexedColumns(dataMapSchema);;
   flushCacheSize = validateAndGetWriteCacheSize(dataMapSchema);
   storeBlockletWise = validateAndGetStoreBlockletWise(dataMapSchema);
   ```
   and so on.
   
   
   
   
   
   
   
   
   

----------------------------------------------------------------
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