Closed as not planned
Description
The .gitattributes
in this repo is currently configured for auto
, which means files are checked out with CRLF on Windows:
azure-sdk-for-go/.gitattributes
Lines 1 to 2 in e1930a7
This doesn't play well with go fmt
, which always converts files to LF (golang/go#16355). If you run go fmt
on unchanged source files, it creates a diff in line endings:
sdk\internal\perf\testdata\perf> go fmt .
main.go
no_op_perf.go
sleep_perf.go
sdk\internal\perf\testdata\perf> git diff
warning: LF will be replaced by CRLF in sdk/internal/perf/testdata/perf/main.go.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in sdk/internal/perf/testdata/perf/no_op_perf.go.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in sdk/internal/perf/testdata/perf/sleep_perf.go.
The file will have its original line endings in your working directory
Perhaps this repo should be configured to always checkout files with LF, even on Windows, for better compat with go fmt
?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Type
Projects
Status
🎊 Closed