[BE][Easy] add .editorconfig setting for C/C++/CUDA/ObjC (#157692)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/157692
Approved by: https://github.com/ezyang
This commit is contained in:
Xuehai Pan
2025-07-07 11:43:31 +08:00
committed by PyTorch MergeBot
parent 987314aa96
commit bdacf08b86
2 changed files with 18 additions and 1 deletions

View File

@ -1,14 +1,30 @@
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
# Python
[*.py]
[*.{py,pyi,py.in,pyi.in}]
indent_style = space
indent_size = 4
# C/C++/CUDA
[*.{cpp,hpp,cxx,cc,c,h,cu,cuh}]
indent_style = space
indent_size = 2
# Objective-C
[*.{mm,m,M}]
indent_style = space
indent_size = 2
# Clang tools
[.clang-{format,tidy}]
indent_style = space
indent_size = 2
# Make
[Makefile]
indent_style = tab