The checkout is changing line endings of files. This can lead to automated checks such as go fmt failing. In my case I have testdata where the byte offset of tokens is important, leading to my tests failing.
I use the following step to adjust files back to LF
- find . -name '*.go' -type f -print0 | xargs -0 sed -i ':a;N;$!ba;s/\r//g'
I tried to unset the “text” gitattribute, which according to gits documentation should prevent automatic line ending changes. However, the issue still persisted. For reference I have the following for my
# We have tests which parse files and fail if file offsets change. So disable # EOL conversions. **/testdata/* -text
The PR which enabled windows support is https://github.com/sourcegraph/go-langserver/pull/329
I originally mentioned this issue in another discussion Go can't find GCC with go1.11.1 on Windows