From 1dda370cb21ab40dbd93641da7821fa78c729661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Kr=C3=BCger?= Date: Thu, 8 Jul 2021 11:44:17 +0200 Subject: [PATCH] Add missing .editorconfig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If an developer have a own '.editorconfig' in some location above the repostires directory it will used in the gradle build and formatting checks can be fail. To avoid this an get an more uniform code style between Nextclouds Android apps the '.editorconfig' from the Nextcloud Android app is used. Because of defining 'root=true' the developers own '.editorconfig' is not used anymore. Signed-off-by: Tim Krüger --- .editorconfig | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..300ea1e8b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,41 @@ +# see http://EditorConfig.org + +# This is the file in the root of the project. +# For sub folders you can have other files that override only some settings. +# For these, this settings should be false. +root=true + +[*] +max_line_length=120 +# use spaces, not tabs. +indent_style=space +indent_size=4 + +[*.yml] +max_line_length=150 + +charset=utf-8 + +# Trimming is good for consistency +trim_trailing_whitespace=true +# I've seen cases where a missing new_line was ignored on *nix systems. +# Never again with this setting! +insert_final_newline=true + +[*.properties] +# Exception for Java properties files should be encoded latin1 (aka iso8859-1) +charset=latin1 + +[*.{cmd,bat}] +# batch files on Windows should stay with CRLF +end_of_line=crlf + +[*.md] +trim_trailing_whitespace=false + +[.drone.yml] +indent_size=2 + +[*.{kt,kts}] +# IDE does not follow this Ktlint rule strictly, but the default ordering is pretty good anyway, so let's ditch it +disabled_rules=import-ordering