[llvm-bugs] [Bug 45056] New: Please support configurable position for Java static imports

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Feb 28 01:57:33 PST 2020


https://bugs.llvm.org/show_bug.cgi?id=45056

            Bug ID: 45056
           Summary: Please support configurable position for Java static
                    imports
           Product: clang
           Version: 9.0
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nikolaos.georgiou at gmail.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

In the documentation ( https://clang.llvm.org/docs/ClangFormatStyleOptions.html
), the "JavaImportGroups" rule specifies that the static imports are always
above regular imports. So clang-format does this:

```
// first the static
import static something.Something.hello;

// then the regular
import something.SomethingElse;
```

It would be great if this behavior is configurable with a new option like
JavaStaticImportsPosition: top|bottom, by default top for backwards
compatibility and if set to bottom it should swap the order to:

```
// first the regular
import something.SomethingElse;

// then the static
import static something.Something.hello;
```

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200228/288c1d3a/attachment.html>


More information about the llvm-bugs mailing list