d-import-sort 0.0.1
A D script for sorting import statements.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
d-import-sort
A tool for sorting import declarations in D.
Usage
$ dub fetch d-import-sort
$ dub run d-import-sort <files>
<<<<filename:minline-maxline
unsorted imports
...
----
sorted imports
...
>>>>
...
Example
$ dub run -- ./source/dimportsort.d
<<<<./source/dimportsort.d:2-7
import std.algorithm : cmp, count, copy, map, setIntersection, sort;
import std.array : array, join;
import std.format : format;
import std.stdio : writeln;
import std.string : empty;
----
import std.algorithm : cmp, copy, count, map, setIntersection, sort;
import std.array : array, join;
import std.format : format;
import std.stdio : writeln;
import std.string : empty;
>>>>
<<<<./source/dimportsort.d:68-71
import std.algorithm : find;
import std.range : drop, take;
import std.algorithm : maxElement, minElement, joiner, splitter;
----
import std.algorithm : find;
import std.algorithm : joiner, maxElement, minElement, splitter;
import std.range : drop, take;
>>>>
TODO
- [x] parse import
- [x] simple sorted output
- [ ] color output
- [ ]
diff
format output - [ ] max line length
- Registered by shigeki karita
- 0.0.1 released 3 years ago
- ShigekiKarita/d-import-sort
- BSL-1.0
- Copyright © 2021, karita
- Authors:
- Dependencies:
- libdparse
- Versions:
-
0.0.4 2021-Nov-23 0.0.3 2021-Nov-23 0.0.2 2021-Nov-22 0.0.1 2021-Nov-22 ~master 2021-Nov-23 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
9 downloads total
-
- Score:
- 0.9
- Short URL:
- d-import-sort.dub.pm