From 25c8958feca765e7fd9db3882dd37bf37176d781 Mon Sep 17 00:00:00 2001 From: Djaytan <26904516+Djaytan@users.noreply.github.com> Date: Sun, 12 Jan 2025 23:25:03 +0100 Subject: [PATCH] chore: normalize line endings _This change is similar to https://github.com/Incendo/cloud/pull/786._ --- .editorconfig | 12 +++++++++++- .gitattributes | 13 ++++++------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.editorconfig b/.editorconfig index 315b30a0..41cc0724 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,8 +1,18 @@ +# EditorConfig: https://editorconfig.org/ + +# Top-most EditorConfig file root = true +# Unix-style newlines with a newline ending every file [*] charset = utf-8 -indent_size = 4 +end_of_line = lf indent_style = space +indent_size = 4 insert_final_newline = true max_line_length = off +trim_trailing_whitespace = true + +# Avoid Markdown new lines removal +[*.md] +trim_trailing_whitespace = false \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index 097f9f98..9063c9d2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,9 +1,8 @@ -# -# https://help.github.com/articles/dealing-with-line-endings/ -# -# Linux start script should use lf -/gradlew text eol=lf +# Documentation: https://www.git-scm.com/docs/gitattributes -# These are Windows script files and should use crlf -*.bat text eol=crlf +# Set default behavior to automatically normalize line endings. +* text=auto eol=lf +# Enforce CRLF line endings in Windows batch scripts to avoid issues. +*.cmd text eol=crlf +*.bat text eol=crlf