Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge&sort imports from the same package #94

Open
mrkam2 opened this issue Sep 23, 2021 · 1 comment
Open

Merge&sort imports from the same package #94

mrkam2 opened this issue Sep 23, 2021 · 1 comment

Comments

@mrkam2
Copy link
Collaborator

mrkam2 commented Sep 23, 2021

Prefer this canonical form:

  (:import
    (com.google.protobuf CodedInputStream CodedOutputStream))

over this repetitive:

  (:import
    (com.google.protobuf CodedInputStream)
    (com.google.protobuf CodedOutputStream))

Also sort class names within it, i. e. change

  (:import
    (com.google.protobuf CodedOutputStream CodedInputStream)

to

  (:import
    (com.google.protobuf CodedInputStream CodedOutputStream)
@mrkam2 mrkam2 changed the title Merge imports from the same package together Merge&sort imports from the same package Sep 23, 2021
@cespare
Copy link
Owner

cespare commented Sep 24, 2021

I intentionally left this out when implementing the "How to ns" rules because there are some hard-to-resolve questions about how, exactly, it should work.

To repeat what I wrote over there, what we need first is a set of rules/heuristics that yield good results, are easy enough to describe, and aren't too hard to implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants