Skip to content

Ensure that shell scripts and Dockerfiles use Unix line-endings #5949

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# https://editorconfig.org

# top-most EditorConfig file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# top-most EditorConfig file
# Treat this config file as the top-level (root) EditorConfig file:

root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
Comment on lines +7 to +8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[*]
end_of_line = lf
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true

4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* text=lf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* text=lf
# Normalize line endings of all non-binary files to LF upon check-in (`git add` / `git commit`):
* text=auto

NOTE:

  • This should technically make the *.gif binary line redundant.
  • text=auto / text=lf only affects check-in. Should anyone check-out on Windows it'll likely normalize to CRLF (only matters if they try to run/process files with CRLF that should otherwise be LF).


# Binary files need to be listed explicitly as first rule makes all files text files
*.gif binary
Loading