You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running this formatter against our code, we noticed that it was removing all but the last line from multi-line block comments on imports.
It looks like this is referenced as a TODO in the README ("Support multiple lines of comment in import block"), but just wanted to call it out as an explicit issue / feature request.
Example
For example, for a file like this:
package example
import (
// A block comment about why this package is being imported.
//
// More information about why this package is being imported.
_ "github.com/example/nested"
)
...
Expected output
We expected nothing to happen to this file. The multi-line comment block would be treated as associated with the import below it and kept together.
Actual output
The formatter removes all but the last line of the comment.
> gci -d .
diff -u example.go.orig example.go
--- example.go.orig 2020-09-01 08:10:37.000000000 -0700
+++ example.go 2020-09-01 08:10:37.000000000 -0700
@@ -1,8 +1,7 @@
package example
import (
- // A block comment about why this package is being imported.
- //
+
// More information about why this package is being imported.
_ "github.com/example/nested"
)
The text was updated successfully, but these errors were encountered:
When running this formatter against our code, we noticed that it was removing all but the last line from multi-line block comments on imports.
It looks like this is referenced as a
TODO
in the README ("Support multiple lines of comment in import block"), but just wanted to call it out as an explicit issue / feature request.Example
For example, for a file like this:
Expected output
We expected nothing to happen to this file. The multi-line comment block would be treated as associated with the import below it and kept together.
Actual output
The formatter removes all but the last line of the comment.
The text was updated successfully, but these errors were encountered: