[tor-commits] [sbws/master] Add editorconfig file and note in contributing

juga at torproject.org juga at torproject.org
Tue Sep 25 09:48:11 UTC 2018


commit ecc69751086250fa93cf6d8312c90271245aa7f1
Author: juga0 <juga at riseup.net>
Date:   Tue Sep 18 18:05:43 2018 +0000

    Add editorconfig file and note in contributing
---
 .editorconfig    | 27 +++++++++++++++++++++++++++
 CONTRIBUTING.rst |  3 +++
 2 files changed, 30 insertions(+)

diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..696cda3
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,27 @@
+# this should work for all editors that support .editorconfig!
+#
+# on debian, emacs users should install elpa-editorconfig and vim
+# users should install vim-editorconfig.
+
+root = true
+
+[*]
+indent_style = space
+# this remove EOF new line with some editors
+# insert_final_newline = true
+trim_trailing_whitespace = true
+end_of_line = lf
+charset = utf-8
+max_line_length = 79
+
+[*.py]
+indent_size = 4
+
+[Makefile]
+indent_style = tab
+
+[*.ini]
+indent_size = 4
+
+[*.yml]
+indent_size = 2
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 186169b..aeeadad 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -98,6 +98,9 @@ External link: `Documentation <https://docs.python-guide.org/writing/documentati
 
 New features should add a corresponding documentation in /docs.
 
+An editor compatible with `EditorConfig <https://editorconfig.org/>`_ will
+help you to follow the general formatting code style.
+
 Timestamps must be in UTC. It is prefered to use ``datetime`` objects or
 Unix timestamps. Timestamps read by the user should be always formatted in
 `ISO 8601 <https://en.wikipedia.org/wiki/ISO_8601>`_





More information about the tor-commits mailing list