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.
This commit is contained in:
Kelvin M. Klann 2023-02-19 16:08:54 -03:00
parent ab1f8af8d0
commit 71d7572950
6 changed files with 46 additions and 0 deletions

View file

@ -5,3 +5,30 @@ charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
# Build
[configure.ac]
indent_size = 8
indent_style = tab
[*{.mk,Makefile}{,.in}]
indent_size = 8
indent_style = tab
# Source code and scripts
[*.{c,h}{,.in}]
indent_size = 8
indent_style = tab
[*.{awk,exp,sh}{,.in}]
indent_size = 8
indent_style = tab
[*.py{,.in}]
indent_size = 4
indent_style = space
# Misc
[.gitlab-ci.yml]
indent_size = 4
indent_style = space

3
.github/.editorconfig vendored Normal file
View file

@ -0,0 +1,3 @@
[*.yml]
indent_size = 2
indent_style = space

View file

@ -0,0 +1,7 @@
[*.lang{,.in}]
indent_size = 2
indent_style = space
[*.vim{,.in}]
indent_size = 2
indent_style = space

View file

@ -0,0 +1,3 @@
[*.sh{,.in}]
indent_size = 4
indent_style = space

View file

@ -0,0 +1,3 @@
[*.bash_completion{,.in}]
indent_size = 4
indent_style = space

View file

@ -0,0 +1,3 @@
[_*{,.in}]
indent_size = 4
indent_style = space