Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant