Add .editorconfig and .gitattributes (#23)

To ensure consistent file formatting

Reviewed-on: https://gitea.com/gitea/test-env/pulls/23
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: silverwind <me@silverwind.io>
Co-committed-by: silverwind <me@silverwind.io>
This commit is contained in:
silverwind 2023-04-12 00:49:03 +08:00 committed by 6543
parent ce003171ea
commit 23e4487a3a
3 changed files with 12 additions and 1 deletions

10
.editorconfig Normal file
View File

@ -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

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
* text=auto eol=lf

View File

@ -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 '*'
RUN git config --global --add safe.directory '*'