diff options
author | Kelvin M. Klann <kmk3.code@protonmail.com> | 2023-02-19 16:08:54 -0300 |
---|---|---|
committer | Kelvin M. Klann <kmk3.code@protonmail.com> | 2023-02-20 18:07:09 -0300 |
commit | 71d7572950e9266fcf54a9278a948f6b88fa495b (patch) | |
tree | cf6318c4e6a213903e005399a3c2111ec5fb4516 | |
parent | Fix inconsistent leading spaces (diff) | |
download | firejail-71d7572950e9266fcf54a9278a948f6b88fa495b.tar.gz firejail-71d7572950e9266fcf54a9278a948f6b88fa495b.tar.zst firejail-71d7572950e9266fcf54a9278a948f6b88fa495b.zip |
editorconfig: add indentation rules
Commands used to list the file extensions used in the project:
$ git ls-files | sed -En 's/.*(\.[^.]+)$/\1/p' |
LC_ALL=C sort | uniq -c
For rules that are more specific to a given directory, put a dedicated
.editorconfig file in it.
-rw-r--r-- | .editorconfig | 27 | ||||
-rw-r--r-- | .github/.editorconfig | 3 | ||||
-rw-r--r-- | contrib/syntax/.editorconfig | 7 | ||||
-rw-r--r-- | platform/rpm/.editorconfig | 3 | ||||
-rw-r--r-- | src/bash_completion/.editorconfig | 3 | ||||
-rw-r--r-- | src/zsh_completion/.editorconfig | 3 |
6 files changed, 46 insertions, 0 deletions
diff --git a/.editorconfig b/.editorconfig index f999431de..7d98c1b14 100644 --- a/.editorconfig +++ b/.editorconfig | |||
@@ -5,3 +5,30 @@ charset = utf-8 | |||
5 | end_of_line = lf | 5 | end_of_line = lf |
6 | insert_final_newline = true | 6 | insert_final_newline = true |
7 | trim_trailing_whitespace = true | 7 | trim_trailing_whitespace = true |
8 | |||
9 | # Build | ||
10 | [configure.ac] | ||
11 | indent_size = 8 | ||
12 | indent_style = tab | ||
13 | |||
14 | [*{.mk,Makefile}{,.in}] | ||
15 | indent_size = 8 | ||
16 | indent_style = tab | ||
17 | |||
18 | # Source code and scripts | ||
19 | [*.{c,h}{,.in}] | ||
20 | indent_size = 8 | ||
21 | indent_style = tab | ||
22 | |||
23 | [*.{awk,exp,sh}{,.in}] | ||
24 | indent_size = 8 | ||
25 | indent_style = tab | ||
26 | |||
27 | [*.py{,.in}] | ||
28 | indent_size = 4 | ||
29 | indent_style = space | ||
30 | |||
31 | # Misc | ||
32 | [.gitlab-ci.yml] | ||
33 | indent_size = 4 | ||
34 | indent_style = space | ||
diff --git a/.github/.editorconfig b/.github/.editorconfig new file mode 100644 index 000000000..eb5c699c5 --- /dev/null +++ b/.github/.editorconfig | |||
@@ -0,0 +1,3 @@ | |||
1 | [*.yml] | ||
2 | indent_size = 2 | ||
3 | indent_style = space | ||
diff --git a/contrib/syntax/.editorconfig b/contrib/syntax/.editorconfig new file mode 100644 index 000000000..385bf17d5 --- /dev/null +++ b/contrib/syntax/.editorconfig | |||
@@ -0,0 +1,7 @@ | |||
1 | [*.lang{,.in}] | ||
2 | indent_size = 2 | ||
3 | indent_style = space | ||
4 | |||
5 | [*.vim{,.in}] | ||
6 | indent_size = 2 | ||
7 | indent_style = space | ||
diff --git a/platform/rpm/.editorconfig b/platform/rpm/.editorconfig new file mode 100644 index 000000000..964dd36dd --- /dev/null +++ b/platform/rpm/.editorconfig | |||
@@ -0,0 +1,3 @@ | |||
1 | [*.sh{,.in}] | ||
2 | indent_size = 4 | ||
3 | indent_style = space | ||
diff --git a/src/bash_completion/.editorconfig b/src/bash_completion/.editorconfig new file mode 100644 index 000000000..298a13b5e --- /dev/null +++ b/src/bash_completion/.editorconfig | |||
@@ -0,0 +1,3 @@ | |||
1 | [*.bash_completion{,.in}] | ||
2 | indent_size = 4 | ||
3 | indent_style = space | ||
diff --git a/src/zsh_completion/.editorconfig b/src/zsh_completion/.editorconfig new file mode 100644 index 000000000..15ca952a4 --- /dev/null +++ b/src/zsh_completion/.editorconfig | |||
@@ -0,0 +1,3 @@ | |||
1 | [_*{,.in}] | ||
2 | indent_size = 4 | ||
3 | indent_style = space | ||