From d0cf968d069d750f613ee7f22a1678dd7166cd81 Mon Sep 17 00:00:00 2001 From: Michael Bestas Date: Wed, 25 Aug 2021 17:27:50 +0300 Subject: [PATCH] Improve .editorconfig setup Add rules for all the project files. Inspired by android studio editorconfig, results in all files containing newlines at the end of file for consistent code style throughout the app. Change-Id: Ifc98fcf75f8e78526a0e186b2b14d44f0f7e45ac --- .editorconfig | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/.editorconfig b/.editorconfig index d2aef5ea..9b1c6c58 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,4 +1,24 @@ +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + [*.{kt,kts}] -indent_size=4 -insert_final_newline=true -max_line_length=100 +indent_size = 4 +max_line_length = 100 + +[app/src/main/res/values-*/strings.xml] +insert_final_newline = unset +trim_trailing_whitespace = unset + +[*.md] +trim_trailing_whitespace = false + +[gradlew.bat] +charset = latin1 +end_of_line = crlf +insert_final_newline = false + +[.editorconfig] +ij_editorconfig_spaces_around_assignment_operators = true