From cc1be019d7582eaeab4667d5a23e713fc7dc4fde Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Mon, 3 Jun 2024 16:36:12 +0100 Subject: [PATCH] editorconfig: update to align with reality Set the root = true flag, so tools don't continue traversing the tree looking for more editorconfig files. In practise we have Unix line endings so adjust the end_of_line flag and enable UTF-8 charset. Enable final newline for all files but patches - most editors already insert one and git gets unhappy otherwise. Finally, use 4 space indent for shell scripts... In practise their style varies _a lot_ but this seems reasonable default IMHO. Signed-off-by: Emil Velikov --- .editorconfig | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.editorconfig b/.editorconfig index 478b03e9..892334f8 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,5 +1,15 @@ -[*.{yaml,sh,gn_args}] -tab_width = 2 +root = true + +[*] +charset = utf-8 +end_of_line = lf indent_size = 2 -end_of_line = crlf -indent_style = space \ No newline at end of file +indent_style = space +insert_final_newline = true + +[*.sh] +indent_size = 4 +indent_style = space + +[*.patch] +insert_final_newline = false