From cb08862674242d071c39045c43ac38ff1b3c5910 Mon Sep 17 00:00:00 2001 From: Cosmin Truta Date: Sun, 15 Sep 2024 22:33:31 +0300 Subject: [PATCH] [libpng16] chore: Set the `indent_size` fields in .editorconfig Also add an .editorconfig-checker.json file. We need to instruct the editorconfig-checker program to skip the checks for the indent size. (As of this commit time, editorconfig-checker is too rigid to recognize "smart indentations".) This is a cherry-pick of commit 67c99f75cf05b354f89c01c8fc15948300e84143 from branch 'libpng18'. Co-authored-by: John Bowler Signed-off-by: John Bowler Signed-off-by: Cosmin Truta --- .editorconfig | 16 ++++++++++++++-- .editorconfig-checker.json | 9 +++++++++ contrib/.editorconfig | 2 ++ contrib/pngexif/.editorconfig | 1 + contrib/visupng/.editorconfig | 3 ++- 5 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 .editorconfig-checker.json diff --git a/.editorconfig b/.editorconfig index f49b2a3e4..349794988 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,29 +8,41 @@ insert_final_newline = true trim_trailing_whitespace = true [*.txt] +indent_size = unset indent_style = space [*.[chS]] +indent_size = 3 indent_style = space max_doc_length = 80 max_line_length = 80 [*.dfa] +indent_size = 3 indent_style = space max_doc_length = 80 max_line_length = 80 -[*.{awk,cmake}] +[*.awk] +indent_size = 3 indent_style = space max_doc_length = 80 max_line_length = 100 -[*.{in,sh}] +[*.cmake] +indent_size = 2 +indent_style = space +max_doc_length = 80 +max_line_length = 100 + +[*.sh] +indent_size = 4 indent_style = space max_doc_length = 100 max_line_length = 100 [{Makefile.in,ltmain.sh}] +indent_size = unset indent_style = unset insert_final_newline = unset max_doc_length = unset diff --git a/.editorconfig-checker.json b/.editorconfig-checker.json new file mode 100644 index 000000000..ef08e0801 --- /dev/null +++ b/.editorconfig-checker.json @@ -0,0 +1,9 @@ +{ + "Disable": { + "IndentSize": true + }, + "Exclude": [ + ".git/", + "out/" + ] +} diff --git a/contrib/.editorconfig b/contrib/.editorconfig index e1b551df7..8b1466b1d 100644 --- a/contrib/.editorconfig +++ b/contrib/.editorconfig @@ -3,5 +3,7 @@ root = false [*.[ch]] +indent_size = unset +indent_style = unset max_doc_length = unset max_line_length = unset diff --git a/contrib/pngexif/.editorconfig b/contrib/pngexif/.editorconfig index ce8fbbfc1..e00082696 100644 --- a/contrib/pngexif/.editorconfig +++ b/contrib/pngexif/.editorconfig @@ -4,6 +4,7 @@ root = true [*] charset = utf-8 +indent_size = 4 indent_style = space insert_final_newline = true max_doc_length = 79 diff --git a/contrib/visupng/.editorconfig b/contrib/visupng/.editorconfig index d946b1446..d5bcb5312 100644 --- a/contrib/visupng/.editorconfig +++ b/contrib/visupng/.editorconfig @@ -5,7 +5,8 @@ root = true [*] charset = utf-8 end_of_line = unset -indent_style = unset +indent_size = 4 +indent_style = space insert_final_newline = true max_doc_length = 80 max_line_length = 100