compassinformatics / cpsi-mapview

GNU General Public License v3.0
6 stars 14 forks source link

editorconfig line endings setting #640

Closed fergaldoyle closed 1 year ago

fergaldoyle commented 1 year ago

The line ending setting in .editorconfig is set to lf`` but the majority of js files arecrlf`.

If you are using EditorConfig within your IDE, on save the file will be automatically converted to use lf. This can lead to diffs which show the whole file has changed instead of the actual lines of change, making PRs difficult to review.

Not sure what the best setting is here. Probably 85% of the files are crlf with the remaining lf. Probably removing end_of_line from .editorconfig will allow the IDE choose the line endings for the file currently being edited.

geographika commented 1 year ago

@fergaldoyle - could you make a pull request with the change to .editorconfig? Longer term it is probably best to standardise on lf, but it is going to mess up the git history somewhat.

fergaldoyle commented 1 year ago

See https://github.com/compassinformatics/cpsi-mapview/pull/641

Using .gitattributes with * text=auto to normalize line endings across operating systems might be the way to go in future: https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings?platform=windows

geographika commented 1 year ago

Fixed with #641