goimports-reviser icon indicating copy to clipboard operation
goimports-reviser copied to clipboard

Right imports sorting & code formatting tool (goimports alternative)

Results 47 goimports-reviser issues
Sort by recently updated
recently updated
newest added

Currently we loop through all go files, grep to see if `"^// Code generated .* DO NOT EDIT\.$"` matches, and skip those files when applying goimports-reviser. An option to avoid...

hey, so I noticed that goimports-reviser removes comment directives by using `go/ast.go (g *CommentGroup) Text()` as it ignores directives in this line ```go if isDirective(c) { // Ignore //go:noinline, //line,...

I would like to use this tool to format the imports for every file in my project. To do this, I have to write a script something similar to ```...

It would be great to have the ability to pass gofmt options such as `-s` etc. Looking at https://golang.org/src/cmd/gofmt/ not sure what the best approach would be here. I see...

A range of the form: `for _ = range v {...}` should be simplified to: `for range v {...}`

enhancement
help wanted

A range of the form: `for x, _ = range v {...}` should be simplified to: `for x = range v {...}`

enhancement
help wanted

A slice expression of the form: `s[a:len(s)]` should be simplified to: `s[a:]`

enhancement
help wanted

An array, slice, or map composite literal of the form: `[]T{T{}, T{}}` should be simplified to: `[]T{{}, {}}`

enhancement
help wanted

Fixes https://github.com/incu6us/goimports-reviser/issues/81