Skip to content

Commit 5db657d

Browse files
jstouracgoogle-labs-jules[bot]coderabbitai[bot]
authored
Add .editorconfig to enforce coding styles (#647)
* Add .editorconfig to enforce coding styles This commit introduces an .editorconfig file to help maintain consistent coding styles across different editors and IDEs. It includes rules for: - End-of-line characters (lf) - Final newline insertion - Trailing whitespace trimming - Character set (utf-8 for js, py, go, sh) - Indentation styles (spaces for Python, YAML, Markdown; tabs for Makefiles, Go) Includes a reference link to editorconfig.org at the top of the file. * Update .editorconfig don't trim trailing whitespaces for the markdown files to allow two-space line-breaks Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 06eca4e commit 5db657d

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.editorconfig

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# https://editorconfig.org/
2+
3+
root = true
4+
5+
[*]
6+
end_of_line = lf
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true
9+
10+
[*.{js,py,go,sh}]
11+
charset = utf-8
12+
13+
[*.py]
14+
indent_style = space
15+
indent_size = 4
16+
17+
[*.{yaml,yml,md}]
18+
indent_style = space
19+
indent_size = 2
20+
21+
[*.md]
22+
trim_trailing_whitespace = false
23+
[Makefile]
24+
indent_style = tab
25+
26+
[*.go]
27+
indent_style = tab

0 commit comments

Comments
 (0)