You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Tak Lon (Stephen) Wu (JIRA)" <ji...@apache.org> on 2018/07/02 23:59:00 UTC

[jira] [Comment Edited] (HBASE-20837) Sync import orders between IDE and checkstyle module

    [ https://issues.apache.org/jira/browse/HBASE-20837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16530581#comment-16530581 ] 

Tak Lon (Stephen) Wu edited comment on HBASE-20837 at 7/2/18 11:58 PM:
-----------------------------------------------------------------------

after I dug into the problem, I figured that it's because the community should have two main sets of developers using Eclipse and IntelliJ, which each tool has a different way importing formatter and `Organize Imports`/ Import Layout (Eclipse has to export the `Organize Imports` separately instead of having it within hbase_eclipse_formatter.xml)

I will send a message to community, if we confirm the import layouts as proposed, we could add the following the dev-support (at least for the Eclipse) to align the developer editor.

1. add *.importorder with dev-support for Eclipse
 2. (optional) add *.xml for IntelliJ support for formatter and Import Layout 

Will see how it goes but at least we have a Jira down for discussion and as a record for this issue.


was (Author: taklwu):
after I dug into the problem, I figured that it's because the community should have two main sets of people using Eclipse and IntelliJ, they have different way for importing formatter and `Organize Imports`/ Import Layout (Eclipse has to export the `Organize Imports` separately instead of having it within hbase_eclipse_formatter.xml) 

I will send a message to community, if we confirm the import layouts as proposed, we could add the following the dev-support (at least for the Eclipse) to align the developer editor.

1. add *.importorder with dev-support for Eclipse
2. (optional) add *.xml for IntelliJ support for formatter and Import Layout 

Will see how it goes but at least we have a Jira down for discussion and as a record for this issue.

> Sync import orders between IDE and checkstyle module
> ----------------------------------------------------
>
>                 Key: HBASE-20837
>                 URL: https://issues.apache.org/jira/browse/HBASE-20837
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 3.0.0, 2.0.1, 1.4.5
>            Reporter: Tak Lon (Stephen) Wu
>            Priority: Minor
>         Attachments: image-2018-07-02-15-27-41-140.png, image-2018-07-02-16-33-18-604.png
>
>
> While working on HBASE-20557 contribution, we figured out that the checkstyle build target (ImportOrder's `groups` [http://checkstyle.sourceforge.net/config_imports.html] ) was different from the development supported IDE (e.g. IntelliJ and Eclipse) formatter, we would provide a fix here to sync between [dev-support/hbase_eclipse_formatter.xml|https://github.com/apache/hbase/blob/master/dev-support/hbase_eclipse_formatter.xml] and [hbase/checkstyle.xml|https://github.com/apache/hbase/blob/master/hbase-checkstyle/src/main/resources/hbase/checkstyle.xml]
> This might need to backport the changes of master to branch-1 and branch-2 as well.
> Before this change, this is what checkstyle is expecting for import order
>  
> {code:java}
> import com.google.common.annotations.VisibleForTesting;
> import java.io.IOException;
> import java.util.ArrayList;
> import java.util.List;
> import java.util.Map;
> import org.apache.commons.logging.Log;
> import org.apache.commons.logging.LogFactory;
> import org.apache.hadoop.conf.Configuration;
> import org.apache.hadoop.hbase.classification.InterfaceAudience;
> import org.apache.hadoop.hbase.conf.ConfigurationObserver;{code}
>  
> And the proposed import order with the respect to HBASE-19262 and HBASE-19552 should be
>  
> !image-2018-07-02-16-33-18-604.png!  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)