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

Imports using GCI ? Getting a linting error because of grouping. #138

Closed
iangregsondev opened this issue Aug 6, 2021 · 2 comments
Closed

Comments

@iangregsondev
Copy link

Hi,

I have been using gofumpt and I am pretty sure I had it working perfectly before but I recently reinstalled my goland IDE..

It is still formatting but my imports are not being grouped.

I installed gofumpt using "go install"

❯ gofumpt --version
v0.1.1


❯ which gofumpt 
/Users/ian/.gvm/pkgsets/go1.16.4/global/bin/gofumpt

image

Does anybody know what I am doing wrong?

Thanks in advance

@mvdan
Copy link
Owner

mvdan commented Aug 7, 2021

I think you're mixing two formatters: https://github.com/daixiang0/gci

gofumpt is compatible with gofmt, but it's not designed to be used at the same time as other tools that want to be in control of formatting, like gci. So you should probably disable gci.

If you want gofumpt to do more with import groups, see #38 - you can leave your opinion there :)

@mvdan mvdan closed this as completed Aug 7, 2021
@iangregsondev
Copy link
Author

Thanks, @mvdan, I will take a look at #38 and in the meantime, I will diable the gci.

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