From 7be13ff0c30291652a506b68cbc0cd3cedd178af Mon Sep 17 00:00:00 2001 From: Max Voitko Date: Thu, 17 Mar 2022 01:12:50 +0200 Subject: [PATCH 1/2] Add .editorconfig file Signed-off-by: Maksym Voitko --- .editorconfig | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..ce413110db --- /dev/null +++ b/.editorconfig @@ -0,0 +1,26 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{py,rst,ini}] +indent_style = space +indent_size = 4 +max_line_length = 120 + +[*.{yml,yaml}] +indent_style = space +indent_size = 2 + +[*.md] +max_line_length = 120 + +[*.{json,sh}] +indent_size = 2 From 7bd4a5108cc417e5f9efb43938ff5b99ccff4f7b Mon Sep 17 00:00:00 2001 From: Max Voitko Date: Thu, 17 Mar 2022 01:17:15 +0200 Subject: [PATCH 2/2] Add go rules for editorconfig Signed-off-by: Maksym Voitko --- .editorconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.editorconfig b/.editorconfig index ce413110db..9bdc92adb8 100644 --- a/.editorconfig +++ b/.editorconfig @@ -24,3 +24,7 @@ max_line_length = 120 [*.{json,sh}] indent_size = 2 + +[{Makefile,go.mod,go.sum,*.go,.gitmodules}] +indent_style = tab +indent_size = 4