From 47f8ced0ac51297d18b2d9c7e30457f454d0f77a Mon Sep 17 00:00:00 2001 From: Alex Abdugafarov Date: Thu, 4 Jun 2020 00:44:29 +0500 Subject: [PATCH] Introduce .editorconfig Summary: By default, GitHub renders tabs as 8-spaces-width, which screws up postgres-inherited formatting. However, GitHub respects `.editorconfig` file, so here we are. Test Plan: Manual inspection of file styles in GitHub Jenkins: skip Reviewers: bogdan, mikhail Reviewed By: mikhail Subscribers: bogdan, mikhail Differential Revision: https://phabricator.dev.yugabyte.com/D8600 --- .editorconfig | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000000..f2f6722bb5a4 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,22 @@ +# https://EditorConfig.org + +root = true + +[*] +charset = utf-8 +max_line_length = 100 +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +tab_width = 4 +trim_trailing_whitespace = true + +# Indentation override for all postgres-style code +[src/{postgres/**.{c,h,mk,in},**/{Makefile,configure}}] +max_line_length = off +indent_style = tab +indent_size = tab + +[*.md] +trim_trailing_whitespace = false