[pacman-dev,3/3] Add http://EditorConfig.org configuration

Message ID 20180503041022.18846-3-eschwartz@archlinux.org
State Accepted, archived
Headers show
Series [pacman-dev,1/3] Remove all modelines from the project | expand

Commit Message

Eli Schwartz May 3, 2018, 4:10 a.m. UTC
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
---
 .editorconfig | 20 ++++++++++++++++++++
 HACKING       |  9 ++-------
 2 files changed, 22 insertions(+), 7 deletions(-)
 create mode 100644 .editorconfig

Patch

diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000..273eef48
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,20 @@ 
+# EditorConfig configuration for pacman
+# http://EditorConfig.org
+
+# Top-most EditorConfig file
+root = true
+
+# Unix-style newlines without trailing whitespaces, but with a newline
+# ending every file, utf-8 charset, set indent to tabs
+[*]
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+charset = utf-8
+indent_style = tab
+
+[NEWS,HACKING]
+indent_style = space
+
+[*.py]
+indent_style = space
diff --git a/HACKING b/HACKING
index e32938cf..009a4682 100644
--- a/HACKING
+++ b/HACKING
@@ -11,13 +11,8 @@  Coding Style
 
 1.  All code should be indented with tabs. (Ignore the use of only spaces in
     this file.) A tab size of two spaces is used when calculating line widths,
-    which should be a maximum of 80 characters. By default, source files
-    contain the following Vim modeline:
-+
-[source,C]
--------------------------------------------
-/* vim: set noet: */
--------------------------------------------
+    which should be a maximum of 80 characters. An EditorConfig file is used
+    to set this project-wide default.
 
 2.  When opening new blocks such as 'while', 'if', or 'for', leave the opening
     brace on the same line as the beginning of the codeblock. The closing brace