Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

comments in import block #46

Closed
bgehman opened this issue Mar 23, 2020 · 1 comment
Closed

comments in import block #46

bgehman opened this issue Mar 23, 2020 · 1 comment

Comments

@bgehman
Copy link

bgehman commented Mar 23, 2020

Shouldn't rewrite comments in import block. Example:

test.go

package test
  
import (
        "crypto/hmac"
        // #nosec
        "crypto/md5"
        // #nosec
        "crypto/sha1"
        "encoding/base64"
)

Results in ($ gofumpt -s -w test.go):

package test

import (
	"crypto/hmac"
	"crypto/md5"
	"crypto/sha1"
	"encoding/base64"

	// #nosec

	// #nosec

)

The // #nosec comments shouldn't be moved around (need for gosec). This linter is conflicting with impi -- can't make them them both happy at the same time.

@mvdan
Copy link
Owner

mvdan commented May 5, 2020

Thanks, this is indeed a bug.

@mvdan mvdan closed this as completed in b304fbd May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants