Closed danielfoehrKn closed 4 years ago
Merging #47 into master will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #47 +/- ##
=======================================
Coverage 76.46% 76.46%
=======================================
Files 13 13
Lines 1198 1198
=======================================
Hits 916 916
Misses 246 246
Partials 36 36
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 5d8d36c...51bbd6a. Read the comment docs.
Ping?
Hello, thanks for the contribution!
I'd rather not add these features to importsort
because you can do this filtering with other tools, like find
.
For example, something like this that finds all go files that are not in the vendor directory or has a name that suggests it was generated:
files=$(find . -name '*.go' ! -path './vendor/*' ! -name '*.pb.go' ! -name '*.gen.go' -print0)
echo "$files" | xargs goimports -l
echo "$files" | xargs importsort -l
Please feel free to fork this utility. It is not being actively maintained anymore.
In multiple projects I am working on (e.g gardener - see example file), we are using the same import grouping this tool supports
Added support for directories and the possibility to define a regex pattern for excluded filenames. This is useful in our case to exclude auto-generated files.
This tool is somewhat one of the only simple enough tools I found to achieve this import grouping, so kudos for that.