Practical Bazel: Force Line Endings to LF
Practical Bazel bazel cross-platform windows linux
Published: 2020-10-29
Practical Bazel: Force Line Endings to LF

Bazel requires all files to end with LF (not CR-LF) in order to work correctly.

If you are performing cross-platform Bazel development with Windows users, you can force this setting for all text files in your repo by creating a .gitattributes file with the following content:

1
2
# Force unix-style linefeeds.
* text=auto eol=lf