config: force lf as line endings

this allows sharing repo on windows running a linux container

BUG=b:308883445
TEST=on windows ran
       py .\tools\dev_container tools/presubmit line_endings

Change-Id: Ief73f1ad2da201dac0337711d0c4f706a936f7a6
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5008193
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
This commit is contained in:
Vikram Auradkar 2023-11-06 13:27:42 -08:00 committed by crosvm LUCI
parent 01065a8286
commit 8dacb2ed64
4 changed files with 39 additions and 23 deletions

15
.gitattributes vendored Normal file
View file

@ -0,0 +1,15 @@
*.rs text eol=lf
*.py text eol=lf
*.js text eol=lf
*.md text eol=lf
*.toml text eol=lf
*.lock text eol=lf
*.proto text eol=lf
.dockerignore text eol=lf
*.json text eol=lf
*.h text eol=lf
.gitignore text eol=lf
.gitmodules text eol=lf
.yml text eol=lf
config text eol=lf
*.svg text eol=lf

View file

@ -1,21 +1,21 @@
MIT License
Copyright (c) 2019-2020 Red Hat, Inc
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MIT License
Copyright (c) 2019-2020 Red Hat, Inc
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -45,6 +45,7 @@ CRLF_LINE_ENDING_FILES: List[str] = [
"**.bat",
"**.ps1",
"e2e_tests/tests/goldens/backcompat_test_simple_lspci_win.txt",
"tools/windows/build_test",
]
@ -59,7 +60,7 @@ def check_line_endings(*files: str):
"Checks line endings. Windows only files are using clrf. All others just lf."
for line in cmd("git ls-files --eol", *files).lines():
parts = line.split()
file = parts[3]
file = parts[-1]
index_endings = parts[0][2:]
wdir_endings = parts[1][2:]

View file

@ -1 +1 @@
python3 tools/windows/build_test.py
python3 tools/windows/build_test.py