-
Notifications
You must be signed in to change notification settings - Fork 65
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: an error occured while trying to parse imports: path is missing starting quotes" on valid Go file #48
Labels
Comments
1 task
daixiang0
added
bug
Something isn't working
help wanted
Extra attention is needed
labels
Mar 1, 2022
Yes, it is truly a bug with CGO, someone interested in fixing it need to add a check for CGO part and skip them. |
Do you have any pointers on where to start to fix this @daixiang0? |
|
charleskorn
added a commit
to charleskorn/gci
that referenced
this issue
Mar 2, 2022
…issing starting quotes" when parsing a file with block comments. Fixes daixiang0#48. Note that this only handles simple cases for block comments, and does not cover more complex cases (see FIXME in parse.go).
charleskorn
added a commit
to charleskorn/gci
that referenced
this issue
Mar 2, 2022
…issing starting quotes" when parsing a file with block comments. Fixes daixiang0#48. Note that this only handles simple cases for block comments, and does not cover more complex cases (see FIXME in parse.go). Signed-off-by: Charles Korn <me@charleskorn.com>
daixiang0
pushed a commit
that referenced
this issue
Mar 3, 2022
…or cgo imports. (#49) * Fix "Error: an error occured while trying to parse imports: path is missing starting quotes" when parsing a file with block comments. Fixes #48. Note that this only handles simple cases for block comments, and does not cover more complex cases (see FIXME in parse.go). Signed-off-by: Charles Korn <me@charleskorn.com> * Make block comment parsing more robust to different formatting. Signed-off-by: Charles Korn <me@charleskorn.com> * Add test case for multiple comments before a "C" import. Signed-off-by: Charles Korn <me@charleskorn.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I have a file that contains this content:
...and invoke
gci
withgci diff --debug file.go
, I get this error:Is this expected? I can't see what the issue is.
Removing the
/* ... */
causesgci
to not fail with an error, but I can't remove that comment as cgo relies on it.The text was updated successfully, but these errors were encountered: