Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: standardize line endings #600

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

rasa
Copy link

@rasa rasa commented Jan 6, 2025

The command

find -type f -name 'gitignore' | xargs -n 1 dos2unix -i | sort | grep -vE '^\s*0'

returns:

       1       0       0  no_bom    text    ./templates/Mill.gitignore
       1      25       1  no_bom    text    ./templates/macOS.gitignore
       2       0       0  no_bom    text    ./templates/NotepadPP.gitignore
       2       0       0  no_bom    text    ./templates/Tye.gitignore
       2       0       0  no_bom    text    ./templates/Typings.gitignore
       4       0       0  no_bom    text    ./templates/SourcePawn.gitignore
       4       1       0  no_bom    text    ./templates/FuseTools.gitignore
      48       0       0  no_bom    text    ./templates/mule.gitignore
       7       0       0  no_bom    text    ./templates/DotnetCore.gitignore

Here's a key to the above:

column description
     1 number of DOS line breaks
     2 number of Unix line breaks
     3 number of Mac line breaks
     4. byte order mark
     5. text or binary
     6. file name

For all the files but macOS.gitignore, this PR replaced all the DOS line breaks with Unix line breaks.

Editorconfig complains about files that have both DOS and Unix line endings.

macOS.gitignore was left alone.

  • Template - Update existing .gitignore template

The command

find -type f -name '*gitignore*' | xargs -n 1 dos2unix -i | sort | grep -vE '^\s*0'

returns:

       1       0       0  no_bom    text    ./templates/Mill.gitignore
       1      25       1  no_bom    text    ./templates/macOS.gitignore
       2       0       0  no_bom    text    ./templates/NotepadPP.gitignore
       2       0       0  no_bom    text    ./templates/Tye.gitignore
       2       0       0  no_bom    text    ./templates/Typings.gitignore
       4       0       0  no_bom    text    ./templates/SourcePawn.gitignore
       4       1       0  no_bom    text    ./templates/FuseTools.gitignore
      48       0       0  no_bom    text    ./templates/mule.gitignore
       7       0       0  no_bom    text    ./templates/DotnetCore.gitignore

Here's a key to the above:

column description
------ -----------
     1 number of DOS line breaks
     2 number of Unix line breaks
     3 number of Mac line breaks
     4. byte order mark
     5. text or binary
     6. file name

For all the files but macOS.gitignore, this PR replaced all the DOS line
breaks with Unix line breaks.

Editorconfig complains about files that have both DOS and Unix line
endings.
@rasa rasa requested a review from a team as a code owner January 6, 2025 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant