editorconfig: update for perl scripts
authorAlex Bennée <alex.bennee@linaro.org>
Thu, 16 Jan 2025 16:02:56 +0000 (16:02 +0000)
committerAlex Bennée <alex.bennee@linaro.org>
Fri, 17 Jan 2025 10:45:38 +0000 (10:45 +0000)
We have two types of perl scripts in the tree. The ones from the
kernel are mostly tab based where as scripts we have written ourselves
use 4 space indentation.

Attempt to codify that in our .editorconfig

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20250116160306.1709518-28-alex.bennee@linaro.org>

.editorconfig

index 7303759ed7d883ff7d699be87b5ab1b6948712a1..a04cb9054cb0d91b8ba04e9a294b029faec41cb2 100644 (file)
@@ -47,3 +47,16 @@ emacs_mode = glsl
 [*.json]
 indent_style = space
 emacs_mode = python
+
+# by default follow QEMU's style
+[*.pl]
+indent_style = space
+indent_size = 4
+emacs_mode = perl
+
+# but user kernel "style" for imported scripts
+[scripts/{kernel-doc,get_maintainer.pl,checkpatch.pl}]
+indent_style = tab
+indent_size = 8
+emacs_mode = perl
+