Skip to content

Commit

Permalink
Introduce .editorconfig file
Browse files Browse the repository at this point in the history
Convenient way to have project based editor config, see http://EditorConfig.org

I walked through the project and tried to identify the most common used
ways for different file types.

Following four types:

  * xml and .conf files
    => 2 spaces
  * manpages
    => 3 spaces
  * doc/html
    => 1 space
  * all others
    => tab with 8
  • Loading branch information
cfconrad committed Feb 12, 2020
1 parent 402fea7 commit 2b6b9fa
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# EditorConfig: http://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
indent_style = tab
indent_size = 8

[**{.xml.in,.xml,.conf}]
indent_style = space
indent_size = 2

[man/*.{0..9}.in]
indent_style = space
indent_size = 3

[man/*.{0..9}]
indent_style = space
indent_size = 3

[doc/schema/*.html]
indent_style = space
indent_size = 1

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*.diff
*.patch
.*
!.editorconfig
compile
core
cscope.*
Expand Down

0 comments on commit 2b6b9fa

Please sign in to comment.