Skip to content

Commit

Permalink
Introduce .editorconfig
Browse files Browse the repository at this point in the history
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
  • Loading branch information
frozenspider committed Jun 3, 2020
1 parent 22acc07 commit 47f8ced
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 47f8ced

Please sign in to comment.