-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
"Gofmt: can't extract issues from gofmt diff output" error on Windows #1169
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
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors. |
Well, I downloaded goimports tool:
And gofmt started magically to work.. |
I found the root reason is that: diff result should be some format like diff --ruN a/oldname1 b/newname1
--- oldname1 2009-10-11 15:12:20.000000000 +0000
+++ newname1 2009-10-11 15:12:30.000000000 +0000
@@ -1,3 +1,9 @@
+This is an important
+notice! It should
+therefore be located at
+the beginning of this
+document!
+
This part of the
document has stayed the
same from version to notice the time format after filename and on windows platform, we may have some strangy --- a Tue Mar 16 10:34:34 2021
+++ b Tue Mar 16 10:34:36 2021 so error is occured when parsing diff result
and I use git's diff |
Thank you for creating the issue!
Please include the following information:
Version of golangci-lint
Config file
Go environment
Verbose output of running
Diff tool for Windows was downloaded from https://www.wzw.tum.de/public-html/syring/win32/UnxUtilsDist.html
Tried also, https://sourceforge.net/projects/gnuwin32/ - same error.
There was similar issue here:
#307
So I tried gofmt with -d:
So I believe this time the linter can't parse output of gofmt. In case if you provide already formatted document, the output is:
The text was updated successfully, but these errors were encountered: