]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Add EditorConfig configuration 995/head
authorVirtualTam <virtualtam@flibidi.net>
Wed, 11 Oct 2017 19:35:17 +0000 (21:35 +0200)
committerVirtualTam <virtualtam@flibidi.net>
Wed, 11 Oct 2017 19:35:17 +0000 (21:35 +0200)
EditorConfig allows specifying indentation, line feed and encoding
properties according to the type of file being edited.

Most editors support it out-of-the-box, or can benefit from it through a
plugin.

See:
- http://editorconfig.org/
- https://github.com/editorconfig/editorconfig
- https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
.editorconfig [new file with mode: 0644]
.gitattributes

diff --git a/.editorconfig b/.editorconfig
new file mode 100644 (file)
index 0000000..5abbd7b
--- /dev/null
@@ -0,0 +1,23 @@
+# EditorConfig: http://EditorConfig.org
+
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+indent_style = space
+indent_size = 4
+
+[*.{html,xml}]
+indent_size = 2
+
+[*.php]
+max_line_length = 100
+
+[Dockerfile]
+max_line_length = 80
+
+[Makefile]
+indent_style = tab
index dd0e573cffb0d6a6aa35bd3a701ea87522963387..939006027f24a5ef9643ffcaaf4620a1b9822a16 100644 (file)
@@ -24,6 +24,7 @@ Dockerfile      text
 *.min.js        binary
 
 # Exclude from Git archives
+.editorconfig   export-ignore
 .gitattributes  export-ignore
 .github         export-ignore
 .gitignore      export-ignore