accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Tubbs (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ACCUMULO-4682) Standardize and enforce import order
Date Fri, 21 Jul 2017 02:49:00 GMT
Christopher Tubbs created ACCUMULO-4682:
-------------------------------------------

             Summary: Standardize and enforce import order
                 Key: ACCUMULO-4682
                 URL: https://issues.apache.org/jira/browse/ACCUMULO-4682
             Project: Accumulo
          Issue Type: Task
            Reporter: Christopher Tubbs
             Fix For: 1.7.4, 1.8.2, 2.0.0


I created a plugin to automatically format Java source files with import order rules.
I ran and tested it on Accumulo and it worked well, aside from a few malformed files.

http://code.revelc.net/impsort-maven-plugin/sort-mojo.html
https://github.com/revelc/impsort-maven-plugin

(NOTE: each group is sorted within its section)

I tested using Eclipse default import order rules, which are:
{code}
static *

java.*

javax.*

org.*

com.*

* - everything else
{code}

These are a bit unnecessary, I think. A saner and more useful ordering might be:
{code}
static *

org.apache.accumulo.*

java.*

javax.*

* - everything else
{code}

Alternatively, I do like the simplicity of:
{code}
static *
(with or without blank line?)
* - everything else
{code}

The plugin can handle any of these, so we just need to pick what we like.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message