microsoft / language-server-protocol

Defines a common protocol for language servers.
https://microsoft.github.io/language-server-protocol/
Creative Commons Attribution 4.0 International
11.33k stars 804 forks source link

[git] Normalize line endings #1514

Closed pisv closed 2 years ago

pisv commented 2 years ago

Currently, the git repository of the project contains a bunch of files with Windows (CRLF) line endings:

.gitignore
.vscode/spellright.dict
License.txt
ThirdPartyNotices.txt
_config.yml
_data/specification-3-14-toc.yml
_data/specification-3-15-toc.yml
_data/specification-3-16-toc.yml
_data/specification-3-17-toc.yml
_implementors/sdks.md
_implementors/tools.md
_layouts/singlePage.html
_layouts/specifications.html
_overviews/lsp/overview.md
_specifications/lsif/0.4.0/specification.md
_specifications/lsif/0.5.0/specification.md
_specifications/lsif/0.6.0/specification.md
_specifications/specification-3-14.md
_specifications/specification-3-15.md
css/bootswatch/cosmo/bootstrap.min.css
css/main.scss

The other files in the repository have Unix (LF) line endings.

Would you consider adding the .gitattributes file [1] and renormalizing line endings [2]?

Essentially, it boils down to:

echo "* text=auto" > .gitattributes
git add .gitattributes
git add --renormalize .
git commit -m "Add .gitattributes and renormalize line endings"

I have done it in a local branch and it seems to work fine. I'm hesitant to provide a PR though, since it would be rather unwieldy to review.

dbaeumer commented 2 years ago

I agree that this should be consistent. I created a PR by myself. Easier to review :-).

dbaeumer commented 2 years ago

See https://github.com/microsoft/language-server-protocol/tree/dbaeumer/breakable-grouse-beige

pisv commented 2 years ago

I agree that this should be consistent. I created a PR by myself. Easier to review :-).

Thanks! And I would have missed the point that the legal stuff should always have CRLF line endings on checkout anyway :-)