From 415253857c08f31539e0233ca430dc1f6bf53fc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Langa?= Date: Fri, 6 Aug 2021 20:37:41 +0200 Subject: [PATCH 1/2] bpo-44854: Add .editorconfig file to help enforce `make patchcheck` --- .editorconfig | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000000..95c2df7fc2da2 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,17 @@ +root = true + +[*] +trim_trailing_whitespace = true +insert_final_newline = true + +[*.py] +indent_size = 4 +indent_style = space + +[*.yml] +indent_size = 2 +indent_style = space + +[*.{c,cpp,h}] +indent_size = 4 +indent_style = space From 398a62ae923a7d923c22a105fd410a197eeb1d97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Langa?= Date: Mon, 9 Aug 2021 19:35:58 +0200 Subject: [PATCH 2/2] Only tidy whitespace within whitelisted file extensions --- .editorconfig | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.editorconfig b/.editorconfig index 95c2df7fc2da2..81445d2d79c73 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,17 +1,12 @@ root = true -[*] +[*.{py,c,cpp,h,rst,md,yml}] trim_trailing_whitespace = true insert_final_newline = true +indent_style = space -[*.py] +[*.{py,c,cpp,h}] indent_size = 4 -indent_style = space [*.yml] indent_size = 2 -indent_style = space - -[*.{c,cpp,h}] -indent_size = 4 -indent_style = space