ControlSystemStudio / phoebus

A framework and set of tools to monitor and operate large scale control systems, such as the ones in the accelerator community.
http://phoebus.org/
Eclipse Public License 1.0
90 stars 90 forks source link

Inconsistent line endings #2909

Open Synthetica9 opened 9 months ago

Synthetica9 commented 9 months ago

There is inconsistency in the line endings, about 10% of files have windows file endings while the other 90% use unix file endings:

$ git ls-files --eol | awk '{ print $1, $2 }' | sort | uniq -c
    309 i/crlf w/crlf
   3369 i/lf w/lf
     65 i/none w/none
    703 i/-text w/-text

I propose we add a .gitattributes file for line endings. https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings#per-repository-settings

Synthetica9 commented 9 months ago

Old CS-studio specified unix line endings, maybe also specify that in this repo?

https://github.com/ControlSystemStudio/cs-studio/wiki/CodingGuidelines

kasemir commented 8 months ago

I'd say this has mostly gone unnoticed. We're nearing 10000 commits. Very few of them looked like large updates because of accidental file ending changes, so those were then corrected. For the most part, either the IDE or default git settings seem to handle it. But you're right, there are quite a few *.java files with inconsistent endings. A global setting that results in CRLF when checked out on Windows, LF for the rest sounds good.