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: 19:1: expected 'STRING', found 'type' (and 10 more errors) #119

Closed
hawkingrei opened this issue Nov 5, 2022 · 5 comments
Closed

Comments

@hawkingrei
Copy link

What version of GCI are you using?

gci version 0.8.2

Reproduce Steps

git clone https://gitlab.com/cznic/sortutil.git
cd sortutil
gci write -s standard -s default sortutil.go

Error: requires at least 1 arg(s), only received 0

What did you expect to see?

not print error

What did you see instead?

return error

@daixiang0
Copy link
Owner

daixiang0 commented Nov 7, 2022

@hawkingrei thanks for the report, please try master HEAD, it would be fixed.

@hawkingrei
Copy link
Author

hawkingrei commented Nov 7, 2022

@daixiang0 I upgrade it in our CI and find new problems.When gci enable write mode. it will remove comments and have a false-positive phenomenon.

https://do.pingcap.net/jenkins/blue/organizations/jenkins/pingcap%2Ftidb%2Fghpr_build/detail/ghpr_build/5907/pipeline/91

@hawkingrei
Copy link
Author

You can test it in tidb repo.

@daixiang0
Copy link
Owner

daixiang0 commented Nov 8, 2022

I see some format problems left over by history, now the failed file testkit/testmain/bench.go has been fixed in master HEAD.

root:[tidb]$ git log testkit/testmain/bench.go
* 6da6e5a57 - *: fix build tag by run gofix (#34260) (7 months ago) <Weizhen Wang>
* b74c13a89 - *: run go fmt in go1.17 (#28784) (1 year ago) <Weizhen Wang>
* 5a4ee311f - test: implement ShortCircuitForBench (#28732) (1 year, 1 month ago) <tison>
root:[tidb]$ gci diff testkit/testmain/bench.go
root:[tidb]$

To ensure no false-positive phenomenon, you can try goimports first then run gci.

@daixiang0
Copy link
Owner

@hawkingrei if no issues left, I will close it.

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