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

Error when running gci against code with "\r\n" #160

Closed
inliquid opened this issue Apr 18, 2023 · 2 comments
Closed

Error when running gci against code with "\r\n" #160

inliquid opened this issue Apr 18, 2023 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@inliquid
Copy link

What version of GCI are you using?

v0.10.1

Reproduce Steps

Run gci against code with "\r\n" instead of "\n" line ending. (This is common when f.e. some Go code is recovered using git with default config on Windows)

>gci diff main.go   
Error: 4:12: expected ';', found "crypto/tls" (and 5 more errors)

What did you expect to see?

Diff showing misplaced imports.

What did you see instead?

Error: 4:12: expected ';', found "crypto/tls" (and 5 more errors)
@daixiang0
Copy link
Owner

I think in the WIN, need an extra step to repleace line break, are you interested in fixing it?

@daixiang0 daixiang0 added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Apr 19, 2023
@daixiang0
Copy link
Owner

Fixed by #168

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants