chore: add .editorconfig and .gitattributes

Add .editorconfig for consistent formatting and .gitattributes
for line ending normalization.
This commit is contained in:
Srikanth Patchava 2026-04-24 19:41:18 -07:00
parent d72f9c8aea
commit fab81cb483
No known key found for this signature in database
GPG Key ID: B904FC2A60B7438D
2 changed files with 45 additions and 0 deletions

21
.editorconfig Normal file
View File

@ -0,0 +1,21 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
[*.{c,h,cpp,hpp}]
indent_style = space
indent_size = 4
[*.{yml,yaml}]
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = false
[Makefile]
indent_style = tab

24
.gitattributes vendored Normal file
View File

@ -0,0 +1,24 @@
# Auto detect text files and perform LF normalization
* text=auto
# Explicitly declare text files
*.md text diff=markdown
*.txt text
*.csv text
*.yml text
*.yaml text
*.json text
*.xml text
*.html text diff=html
*.css text diff=css
# Denote binary files
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.pdf binary
*.zip binary
*.gz binary
*.tar binary