From 23e4487a3a3ac3289848f356dbf3c62db458e5ff Mon Sep 17 00:00:00 2001 From: silverwind Date: Wed, 12 Apr 2023 00:49:03 +0800 Subject: [PATCH] Add .editorconfig and .gitattributes (#23) To ensure consistent file formatting Reviewed-on: https://gitea.com/gitea/test-env/pulls/23 Reviewed-by: Lunny Xiao Reviewed-by: 6543 <6543@obermui.de> Co-authored-by: silverwind Co-committed-by: silverwind --- .editorconfig | 10 ++++++++++ .gitattributes | 1 + Dockerfile | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .editorconfig create mode 100644 .gitattributes diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..aaaa7a4 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,10 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +tab_width = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6313b56 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/Dockerfile b/Dockerfile index d69bb71..076eb33 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,4 +38,4 @@ RUN curl -SL https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz \ USER gitea RUN git config --global --add safe.directory '*' USER root -RUN git config --global --add safe.directory '*' \ No newline at end of file +RUN git config --global --add safe.directory '*'