hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Elser <els...@apache.org>
Subject Re: [DISCUSS] update our imports layout
Date Sun, 01 Oct 2017 19:37:42 GMT
Playing devil's advocate:

Do we want to maintain our own "special" way of doing imports instead of 
relying on something such as the Google Java style guide? [1]

+1 to the idea of cleaning things up, but just curious if people feel 
like our special import ordering is important (and not just vestigial). 
Personally, I don't have much concern about import order than having 
consistency -- I like the idea of letting someone hash out what is 
recommended :)

[1] 
https://google.github.io/styleguide/javaguide.html#s3.3-import-statements

On 10/1/17 11:27 AM, Chia-Ping Tsai wrote:
> hi folks,
> 
> I noticed the code conflict occurs on the imports frequently. To resolve the conflict
is a complete waste of time, so i feel it is time to update our imports layout and hold our
attraction on it.
> 
> The import layout is shown below. (see hbase_eclipse_formatter.xml)
> javax.*
> blank line
> java.*
> blank line
> import all other imports
> blank line
> import static all other imports
> 
> Q1:
> As i see it, two updates should be considered.
> 1) Should we move the "import static" to the top? (It seems most of files have its static
imports on the top)
> 2) Should we move the shaded class into new blocks?
> 
> The new layout looks like this.
> import static all other imports
> blank line
> javax.*
> blank line
> java.*
> blank line
> org.*
> blank line
> org.apache.hadoop.hbase.shaded.*
> blank line
> import all other imports
> 
> Q2:
> Should we check the import layout before committing? Perhaps we can address this in the
HBASE-18438. The issue try to add the check of unused imports
> 
> Any suggestions? Thanks.
> --
> Chia-Ping
> 

Mime
View raw message