summaryrefslogtreecommitdiffstats
path: root/.editorconfig
diff options
context:
space:
mode:
authorSalvatore Bonaccorso <carnil@debian.org>2024-01-25 06:31:16 +0100
committerSalvatore Bonaccorso <carnil@debian.org>2024-01-25 07:15:02 +0100
commitfd3c9e04ebd9045a724bd0f4cea9d2bf1442d41f (patch)
tree5be365cad287cce15fb6f9ec15d374fc06026bf8 /.editorconfig
parent3c4b3735f0a14c2f0e81e8f3cb5ca6c96b1440cb (diff)
Add .editorconfig file for basic formatting
EditorConfig is a specification to define the most basic code formatting stuff, and it's supported by many editors and IDEs, either directly or via plugins, including VSCode/VSCodium, Vim, emacs and more. It allows to define formatting style related to indentation, charset, end of lines and trailing whitespaces. It also allows to apply different formats for different files based on wildcards, so for example it is possible to apply different configs to *.{c,h}, *.py and *.rs. For the security-tracker, modelled after the very same change in the linux project, defining a .editorconfig might help to those people that work on different projects with different indentation styles, so they cannot define a global style. Now they will directly see the correct indentation on every fresh clone of the project. See https://editorconfig.org Link: https://git.kernel.org/linus/5a602de99797bddc9dd7f73592281a507196f69d Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
Diffstat (limited to '.editorconfig')
-rw-r--r--.editorconfig20
1 files changed, 20 insertions, 0 deletions
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000000..7293768c7d
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,20 @@
+# Copyright © 2024 Salvatore Bonaccorso <carnil@debian.org>
+#
+# This file is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this file. If not, see <https://www.gnu.org/licenses/>.
+
+root = true
+
+[data/*/list]
+trim_trailing_whitespace = true
+indent_style = tab

© 2014-2024 Faster IT GmbH | imprint | privacy policy